feat: add tree-sitter-gitattributes

This commit is contained in:
ObserverOfTime 2022-09-08 14:48:02 +03:00 committed by Christian Clason
parent 1efa67e7a0
commit 721251dbfc
3 changed files with 66 additions and 0 deletions

View file

@ -1205,6 +1205,17 @@ list.gitignore = {
maintainers = { "@theHamsta" },
}
list.gitattributes = {
install_info = {
url = "https://github.com/ObserverOfTime/tree-sitter-gitattributes",
files = { "src/parser.c" },
branch = "master",
requires_generate_from_grammar = false,
},
maintainers = { "@ObserverOfTime" },
experimental = true,
}
local M = {
list = list,
filetype_to_parsername = filetype_to_parsername,

View 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

View file

@ -0,0 +1 @@
(comment) @comment