diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2022-09-28 17:48:09 +0300 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-10-15 08:44:41 -0700 |
| commit | 0bfeb5484ec6323df6504cd0548dc9c1dc636aef (patch) | |
| tree | eb63cf49b78a588ef16e49acc63e70e88ba4e91b | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.tar nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.tar.gz nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.tar.bz2 nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.tar.lz nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.tar.xz nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.tar.zst nvim-treesitter-0bfeb5484ec6323df6504cd0548dc9c1dc636aef.zip | |
test(gitattributes): add tests for highlights
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 3 | ||||
| -rw-r--r-- | queries/gitattributes/highlights.scm | 3 | ||||
| -rw-r--r-- | tests/query/highlights/gitattributes/test.gitattributes | 37 |
3 files changed, 38 insertions, 5 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index dfa562961..f989d8bac 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1217,11 +1217,8 @@ 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, } list.blueprint = { diff --git a/queries/gitattributes/highlights.scm b/queries/gitattributes/highlights.scm index 2e2a89346..ecd410972 100644 --- a/queries/gitattributes/highlights.scm +++ b/queries/gitattributes/highlights.scm @@ -50,5 +50,4 @@ (ERROR) @error -(comment) @comment -(comment) @spell +(comment) @comment @spell diff --git a/tests/query/highlights/gitattributes/test.gitattributes b/tests/query/highlights/gitattributes/test.gitattributes new file mode 100644 index 000000000..5b2e12005 --- /dev/null +++ b/tests/query/highlights/gitattributes/test.gitattributes @@ -0,0 +1,37 @@ +[attr]nodiff -diff -merge +# <- preproc +# ^^^^^^ property +# ^ operator +# ^^^^ variable.builtin +# ^ operator +# ^^^^^ variable.builtin + +vendor/** linguist-vendored=true +# ^ punctuation.delimiter +# ^^ punctuation.special +# ^^^^^^^^^^^^^^^^^ parameter +# ^ operator +# ^^^^ boolean + + [^._]-[[:lower:]] !something +# ^ punctuation.bracket +# ^ operator +# ^^ string.special +# ^ punctuation.bracket +# ^ punctuation.bracket +# ^^^^^^^^^ constant +# ^ punctuation.bracket +# ^ operator +# ^^^^^^^^^^ parameter + +"_\u4E00\t\56txt" encoding=UTF-16 +# <- character.special +# ^^^^^^ string.escape +# ^^ string.escape +# ^^^ string.escape +# ^ character.special +# ^^^^^^^^ variable.builtin +# ^ operator +# ^^^^^^ string + +# vim:ft=gitattributes: |
