mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 22:10:01 -04:00
feat: add tree-sitter-gitattributes
This commit is contained in:
parent
1efa67e7a0
commit
721251dbfc
3 changed files with 66 additions and 0 deletions
54
queries/gitattributes/highlights.scm
Normal file
54
queries/gitattributes/highlights.scm
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
(dir_sep) @punctuation.delimiter
|
||||
|
||||
(wildcard) @punctuation.special
|
||||
|
||||
(quoted_pattern
|
||||
("\"" @character.special))
|
||||
|
||||
(range_notation) @string.special
|
||||
|
||||
(range_notation
|
||||
[ "[" "]" ] @punctuation.bracket)
|
||||
|
||||
(range_negation) @operator
|
||||
|
||||
(character_class) @constant
|
||||
|
||||
(class_range ("-" @operator))
|
||||
|
||||
[
|
||||
(ansi_c_escape)
|
||||
(escaped_char)
|
||||
] @string.escape
|
||||
|
||||
(attribute
|
||||
(attr_name) @parameter)
|
||||
|
||||
(attribute
|
||||
(builtin_attr) @variable.builtin)
|
||||
|
||||
[
|
||||
(attr_reset)
|
||||
(attr_unset)
|
||||
(attr_set)
|
||||
] @operator
|
||||
|
||||
(boolean_value) @boolean
|
||||
|
||||
(string_value) @string
|
||||
|
||||
(macro_tag) @preproc
|
||||
|
||||
(macro_def
|
||||
macro_name: (_) @property)
|
||||
|
||||
[
|
||||
(pattern_negation)
|
||||
(redundant_escape)
|
||||
(trailing_slash)
|
||||
] @error
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
1
queries/gitattributes/injections.scm
Normal file
1
queries/gitattributes/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
Loading…
Add table
Add a link
Reference in a new issue