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

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