feat: editorconfig parser and queries

This commit is contained in:
Omar Valdez 2024-07-04 10:23:44 -07:00 committed by GitHub
parent acc1708b96
commit 5d1646893a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 70 additions and 0 deletions

View file

@ -140,6 +140,9 @@
"ebnf": {
"revision": "8e635b0b723c620774dfb8abf382a7f531894b40"
},
"editorconfig": {
"revision": "aec8400b9554eae784125054ac4af7b767804844"
},
"eds": {
"revision": "0ad62cb635c2f4353359a88dec9e3a57bbf9f66d"
},

View file

@ -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",

View file

@ -0,0 +1 @@
(section) @fold

View 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

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))