mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Add YANG parser
This commit is contained in:
parent
a7c90103ce
commit
a6121f014d
4 changed files with 40 additions and 0 deletions
|
|
@ -206,6 +206,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [verilog](https://github.com/tree-sitter/tree-sitter-verilog) (maintained by @zegervdv)
|
||||
- [x] [vue](https://github.com/ikatyang/tree-sitter-vue) (maintained by @WhyNotHugo)
|
||||
- [x] [yaml](https://github.com/ikatyang/tree-sitter-yaml) (maintained by @stsewd)
|
||||
- [x] [yang](https://github.com/Hubro/tree-sitter-yang) (maintained by @Hubro)
|
||||
- [x] [zig](https://github.com/Himujjal/tree-sitter-zig) (maintained by @Himujjal)
|
||||
<!--parserinfo-->
|
||||
|
||||
|
|
|
|||
1
ftdetect/yang.vim
Normal file
1
ftdetect/yang.vim
Normal file
|
|
@ -0,0 +1 @@
|
|||
au BufRead,BufNewFile *.yang set filetype=yang
|
||||
|
|
@ -424,6 +424,15 @@ list.yaml = {
|
|||
maintainers = { "@stsewd" },
|
||||
}
|
||||
|
||||
list.yang = {
|
||||
install_info = {
|
||||
url = "https://github.com/Hubro/tree-sitter-yang",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@Hubro" },
|
||||
filetype = "yang",
|
||||
}
|
||||
|
||||
list.nix = {
|
||||
install_info = {
|
||||
url = "https://github.com/cstrahan/tree-sitter-nix",
|
||||
|
|
|
|||
29
queries/yang/highlights.scm
Normal file
29
queries/yang/highlights.scm
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
(comment) @comment
|
||||
|
||||
; Module / submodule
|
||||
["module" "submodule"] @keyword
|
||||
|
||||
; Keywords
|
||||
(statement_keyword) @keyword
|
||||
(extension_keyword) @string.escape
|
||||
|
||||
; Arguments
|
||||
(built_in_type) @type.builtin
|
||||
(integer) @number
|
||||
(boolean) @boolean
|
||||
(date) @number
|
||||
(range) @string.escape
|
||||
(unquoted_range) @string.escape
|
||||
(yang_version) @string.escape
|
||||
(identifier) @variable
|
||||
(node_identifier) @variable
|
||||
(glob) @string
|
||||
(string) @string
|
||||
(unquoted_string) @string
|
||||
(keypath) @string.escape
|
||||
|
||||
; Punctuation
|
||||
(plus_symbol) @punctuation.delimiter
|
||||
["{" "}"] @punctuation.bracket
|
||||
[";"] @punctuation.delimiter
|
||||
Loading…
Add table
Add a link
Reference in a new issue