aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authormhoffm <mhoffm@posteo.de>2021-06-28 19:11:33 +0200
committerStephan Seitz <stephan.lauf@yahoo.de>2021-07-02 01:56:25 +0200
commit9275a15aadc6a429af23fd82245fea5ed2799e71 (patch)
tree8a372bb91904cf5e28f7bb3617f2fd1f5502860e /queries
parentpython(highlights): don't use type for APP (diff)
downloadnvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.tar
nvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.tar.gz
nvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.tar.bz2
nvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.tar.lz
nvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.tar.xz
nvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.tar.zst
nvim-treesitter-9275a15aadc6a429af23fd82245fea5ed2799e71.zip
add hcl parser
Diffstat (limited to 'queries')
-rw-r--r--queries/hcl/folds.scm5
-rw-r--r--queries/hcl/highlights.scm72
2 files changed, 77 insertions, 0 deletions
diff --git a/queries/hcl/folds.scm b/queries/hcl/folds.scm
new file mode 100644
index 000000000..8349f4f91
--- /dev/null
+++ b/queries/hcl/folds.scm
@@ -0,0 +1,5 @@
+[
+ (comment)
+ (block)
+ (heredoc_template)
+] @fold
diff --git a/queries/hcl/highlights.scm b/queries/hcl/highlights.scm
new file mode 100644
index 000000000..135351ac3
--- /dev/null
+++ b/queries/hcl/highlights.scm
@@ -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