mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
4
runtime/queries/htmldjango/folds.scm
Normal file
4
runtime/queries/htmldjango/folds.scm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
(paired_statement)
|
||||
(paired_comment)
|
||||
] @fold
|
||||
73
runtime/queries/htmldjango/highlights.scm
Normal file
73
runtime/queries/htmldjango/highlights.scm
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
; adapted from https://github.com/interdependence/tree-sitter-htmldjango
|
||||
[
|
||||
(unpaired_comment)
|
||||
(paired_comment)
|
||||
] @comment @spell
|
||||
|
||||
[
|
||||
"{{"
|
||||
"}}"
|
||||
"{%"
|
||||
"%}"
|
||||
(end_paired_statement)
|
||||
] @punctuation.special
|
||||
|
||||
(tag_name) @function
|
||||
|
||||
((tag_name) @keyword.conditional
|
||||
(#any-of? @keyword.conditional "if" "elif" "else" "endif"))
|
||||
|
||||
((tag_name) @keyword.repeat
|
||||
(#any-of? @keyword.repeat "for" "endfor"))
|
||||
|
||||
(variable_name) @variable
|
||||
|
||||
(unpaired_statement
|
||||
(tag_name)
|
||||
(variable
|
||||
(variable_name) @variable.parameter)
|
||||
.
|
||||
"="
|
||||
.
|
||||
(_))
|
||||
|
||||
(filter_name) @function.method
|
||||
|
||||
(filter_argument) @variable.parameter
|
||||
|
||||
(keyword) @keyword
|
||||
|
||||
[
|
||||
"|"
|
||||
"="
|
||||
(operator)
|
||||
] @operator
|
||||
|
||||
(keyword_operator) @keyword.operator
|
||||
|
||||
(string) @string
|
||||
|
||||
(filter
|
||||
[
|
||||
"'"
|
||||
"\""
|
||||
]
|
||||
.
|
||||
(filter_argument) @string)
|
||||
|
||||
(number) @number
|
||||
|
||||
((filter
|
||||
(filter_argument) @number)
|
||||
(#lua-match? @number "^%d+$"))
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
((filter
|
||||
(filter_argument) @boolean)
|
||||
(#any-of? @boolean "True" "False"))
|
||||
|
||||
[
|
||||
":"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
5
runtime/queries/htmldjango/indents.scm
Normal file
5
runtime/queries/htmldjango/indents.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(paired_statement) @indent.begin
|
||||
|
||||
(end_paired_statement) @indent.end
|
||||
|
||||
(branch_statement) @indent.branch
|
||||
9
runtime/queries/htmldjango/injections.scm
Normal file
9
runtime/queries/htmldjango/injections.scm
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
([
|
||||
(paired_comment)
|
||||
(unpaired_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((content) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.combined))
|
||||
Loading…
Add table
Add a link
Reference in a new issue