diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2026-09-09 16:56:20 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2026-09-10 09:40:38 +0200 |
| commit | 65d2d179047131cb07769066bd8a82c6a439fe77 (patch) | |
| tree | 86b06236e944c045d15205a6dc3273c547a74c94 /runtime/queries/kdl/highlights.scm | |
| parent | docs: drop query maintainers (diff) | |
| download | nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.tar nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.tar.gz nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.tar.bz2 nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.tar.lz nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.tar.xz nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.tar.zst nvim-treesitter-65d2d179047131cb07769066bd8a82c6a439fe77.zip | |
feat(kdl)!: update parser and queriesbump/kdl
Also mark as Tier 1.
Diffstat (limited to 'runtime/queries/kdl/highlights.scm')
| -rw-r--r-- | runtime/queries/kdl/highlights.scm | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/runtime/queries/kdl/highlights.scm b/runtime/queries/kdl/highlights.scm index 7d200c85e..72a8ca395 100644 --- a/runtime/queries/kdl/highlights.scm +++ b/runtime/queries/kdl/highlights.scm @@ -1,33 +1,51 @@ -; Types ; Variables (identifier) @variable ; Nodes (node - (identifier) @tag) + name: (identifier) @tag) + +(node + name: (identifier + (string) @tag)) + +; Types +(type) @type -; Type annotation (type - (identifier) @type) + name: (identifier) @type) + +; Reserved type annotations are advisory in the spec, not syntax. +((type + name: (identifier) @type.builtin) + (#any-of? @type.builtin + "i8" "i16" "i32" "i64" "i128" "u8" "u16" "u32" "u64" "u128" "isize" "usize" "f32" "f64" + "decimal64" "decimal128" "date-time" "time" "date" "duration" "decimal" "currency" "country-2" + "country-3" "country-subdivision" "email" "idn-email" "hostname" "idn-hostname" "ipv4" "ipv6" + "url" "url-reference" "irl" "irl-reference" "url-template" "uuid" "regex" "base64" "base85")) ; Properties (prop - (identifier) @property) + key: (identifier) @property) ; Operators -[ - "=" - "+" - "-" -] @operator +"=" @operator ; Literals (string) @string +(multi_line_string) @string + +(string_fragment) @string + (escape) @string.escape +(escaped_whitespace) @string.escape + (number) @number +(keyword_number) @number + (number (decimal) @number.float) @@ -36,7 +54,10 @@ (boolean) @boolean -"null" @constant.builtin +[ + "null" + "#null" +] @constant.builtin ; Punctuation [ @@ -55,17 +76,11 @@ [ (single_line_comment) (multi_line_comment) + (version) ] @comment @spell -(node - (node_comment) - (#set! priority 105)) @comment +(node_comment) @comment -(node - (node_field - (node_field_comment) - (#set! priority 105)) @comment) +(node_field_comment) @comment -(node_children - (node_children_comment) - (#set! priority 105)) @comment +(node_children_comment) @comment |
