mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -04:00
feat: editorconfig parser and queries
This commit is contained in:
parent
acc1708b96
commit
5d1646893a
5 changed files with 70 additions and 0 deletions
|
|
@ -140,6 +140,9 @@
|
|||
"ebnf": {
|
||||
"revision": "8e635b0b723c620774dfb8abf382a7f531894b40"
|
||||
},
|
||||
"editorconfig": {
|
||||
"revision": "aec8400b9554eae784125054ac4af7b767804844"
|
||||
},
|
||||
"eds": {
|
||||
"revision": "0ad62cb635c2f4353359a88dec9e3a57bbf9f66d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -469,6 +469,14 @@ list.ebnf = {
|
|||
experimental = true,
|
||||
}
|
||||
|
||||
list.editorconfig = {
|
||||
install_info = {
|
||||
url = "https://github.com/ValdezFOmar/tree-sitter-editorconfig",
|
||||
files = { "src/parser.c", "src/scanner.c" },
|
||||
},
|
||||
maintainers = { "@ValdezFOmar" },
|
||||
}
|
||||
|
||||
list.eds = {
|
||||
install_info = {
|
||||
url = "https://github.com/uyha/tree-sitter-eds",
|
||||
|
|
|
|||
1
queries/editorconfig/folds.scm
Normal file
1
queries/editorconfig/folds.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(section) @fold
|
||||
56
queries/editorconfig/highlights.scm
Normal file
56
queries/editorconfig/highlights.scm
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
(comment) @comment @spell
|
||||
|
||||
; consistency with toml and ini
|
||||
(section
|
||||
(section_name) @type)
|
||||
|
||||
(character_choice
|
||||
(character) @constant)
|
||||
|
||||
(character_range
|
||||
start: (character) @constant
|
||||
end: (character) @constant)
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
","
|
||||
".."
|
||||
(path_separator)
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"-"
|
||||
"="
|
||||
(negation)
|
||||
] @operator
|
||||
|
||||
[
|
||||
(wildcard_characters)
|
||||
(wildcard_any_characters)
|
||||
(wildcard_single_character)
|
||||
] @character.special
|
||||
|
||||
(escaped_character) @string.escape
|
||||
|
||||
(pair
|
||||
key: (identifier) @property
|
||||
value: (_) @string)
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
(integer) @number
|
||||
|
||||
(unset) @constant.builtin
|
||||
|
||||
[
|
||||
(spelling_language)
|
||||
(indent_style)
|
||||
(end_of_line)
|
||||
(charset)
|
||||
] @string.special
|
||||
2
queries/editorconfig/injections.scm
Normal file
2
queries/editorconfig/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue