mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
test(gitattributes): add tests for highlights
This commit is contained in:
parent
7135163fd4
commit
0bfeb5484e
3 changed files with 38 additions and 5 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -50,5 +50,4 @@
|
|||
|
||||
(ERROR) @error
|
||||
|
||||
(comment) @comment
|
||||
(comment) @spell
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
37
tests/query/highlights/gitattributes/test.gitattributes
Normal file
37
tests/query/highlights/gitattributes/test.gitattributes
Normal file
|
|
@ -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:
|
||||
Loading…
Add table
Add a link
Reference in a new issue