aboutsummaryrefslogtreecommitdiffstats
path: root/queries/gitattributes
diff options
context:
space:
mode:
authorObserverOfTime <chronobserver@disroot.org>2022-09-08 14:48:02 +0300
committerChristian Clason <christian.clason@uni-due.de>2022-09-09 09:46:54 +0200
commit721251dbfcd8160b189b8d8d47873e9d1fe9a5a4 (patch)
tree5c9baabccd29204df55accc4ac002d325f7b8116 /queries/gitattributes
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.tar
nvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.tar.gz
nvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.tar.bz2
nvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.tar.lz
nvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.tar.xz
nvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.tar.zst
nvim-treesitter-721251dbfcd8160b189b8d8d47873e9d1fe9a5a4.zip
feat: add tree-sitter-gitattributes
Diffstat (limited to 'queries/gitattributes')
-rw-r--r--queries/gitattributes/highlights.scm54
-rw-r--r--queries/gitattributes/injections.scm1
2 files changed, 55 insertions, 0 deletions
diff --git a/queries/gitattributes/highlights.scm b/queries/gitattributes/highlights.scm
new file mode 100644
index 000000000..2e2a89346
--- /dev/null
+++ b/queries/gitattributes/highlights.scm
@@ -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
diff --git a/queries/gitattributes/injections.scm b/queries/gitattributes/injections.scm
new file mode 100644
index 000000000..4bb7d675d
--- /dev/null
+++ b/queries/gitattributes/injections.scm
@@ -0,0 +1 @@
+(comment) @comment