mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
add hcl parser
This commit is contained in:
parent
6d5b4f19f3
commit
9275a15aad
5 changed files with 91 additions and 0 deletions
5
queries/hcl/folds.scm
Normal file
5
queries/hcl/folds.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
(comment)
|
||||
(block)
|
||||
(heredoc_template)
|
||||
] @fold
|
||||
72
queries/hcl/highlights.scm
Normal file
72
queries/hcl/highlights.scm
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
; highlights.scm
|
||||
|
||||
[
|
||||
"!"
|
||||
"\*"
|
||||
"/"
|
||||
"%"
|
||||
"\+"
|
||||
"-"
|
||||
">"
|
||||
">="
|
||||
"<"
|
||||
"<="
|
||||
"=="
|
||||
"!="
|
||||
"&&"
|
||||
"||"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
"["
|
||||
"]"
|
||||
"("
|
||||
")"
|
||||
"[*]"
|
||||
".*"
|
||||
] @specialChar
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
] @specialChar
|
||||
|
||||
[
|
||||
(ellipsis)
|
||||
"\?"
|
||||
":"
|
||||
"=>"
|
||||
] @special
|
||||
|
||||
[
|
||||
"for"
|
||||
"in"
|
||||
] @repeat
|
||||
|
||||
[
|
||||
"if"
|
||||
] @conditional
|
||||
|
||||
[
|
||||
(string_lit)
|
||||
(quoted_template)
|
||||
(heredoc_template)
|
||||
] @string
|
||||
|
||||
(heredoc_identifier) @namespace
|
||||
(heredoc_start) @namespace
|
||||
(template_interpolation) @statement
|
||||
(numeric_lit) @number
|
||||
(bool_lit) @boolean
|
||||
(null_lit) @constant
|
||||
(comment) @comment
|
||||
(identifier) @identifier
|
||||
|
||||
(block (identifier) @namespace)
|
||||
(function_call (identifier) @function)
|
||||
(function_call (function_arguments) @parameter)
|
||||
(attribute (identifier) @symbol)
|
||||
|
||||
(ERROR) @error
|
||||
Loading…
Add table
Add a link
Reference in a new issue