aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Hotham <david.hotham@metaswitch.com>2020-12-16 09:59:59 +0000
committerThomas Vigouroux <tomvig38@gmail.com>2020-12-25 15:56:49 +0100
commit4addec13616481f99e0400586f0b60b4314ef5a2 (patch)
tree429ca464273074904baf2bf8c3bd988baf822626
parentfeat: Add more bash queries (diff)
downloadnvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.tar
nvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.tar.gz
nvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.tar.bz2
nvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.tar.lz
nvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.tar.xz
nvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.tar.zst
nvim-treesitter-4addec13616481f99e0400586f0b60b4314ef5a2.zip
first draft of YAML highlighting
-rw-r--r--queries/yaml/highlights.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/queries/yaml/highlights.scm b/queries/yaml/highlights.scm
new file mode 100644
index 000000000..e5ca1a43f
--- /dev/null
+++ b/queries/yaml/highlights.scm
@@ -0,0 +1,31 @@
+(block_mapping_pair key: (flow_node) @field)
+(flow_pair key: (flow_node) @field) ; This one doesn't seem to work, no idea what's wrong with it.
+(boolean_scalar) @boolean
+(null_scalar) @constant.builtin
+(double_quote_scalar) @string
+(single_quote_scalar) @string
+(double_quote_scalar (escape_sequence)) @string.escape
+(single_quote_scalar (escape_sequence)) @string.escape
+(integer_scalar) @number
+(float_scalar) @number
+(comment) @comment
+(anchor) @type
+(alias) @type
+(tag) @type
+(yaml_directive) @keyword
+(ERROR) @error
+[
+; "+" ; including this causes "invalid node type" errors?!?
+","
+"-"
+":"
+">"
+"?"
+"|"
+] @punctuation.delimiter
+[
+"["
+"]"
+"{"
+"}"
+] @punctuation.bracket