diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-02-04 15:42:12 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-02-05 02:21:49 -0800 |
| commit | 720f75f9881cae820cecde23fc2f07affacf2826 (patch) | |
| tree | 31e891b6b3f877010c75905023166c8bad79df75 /queries | |
| parent | Update parsers: arduino, markdown, markdown_inline, tlaplus (diff) | |
| download | nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.tar nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.tar.gz nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.tar.bz2 nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.tar.lz nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.tar.xz nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.tar.zst nvim-treesitter-720f75f9881cae820cecde23fc2f07affacf2826.zip | |
feat: add RON
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/ron/folds.scm | 7 | ||||
| -rw-r--r-- | queries/ron/highlights.scm | 53 | ||||
| -rw-r--r-- | queries/ron/indents.scm | 12 | ||||
| -rw-r--r-- | queries/ron/injections.scm | 4 | ||||
| -rw-r--r-- | queries/ron/locals.scm | 12 |
5 files changed, 88 insertions, 0 deletions
diff --git a/queries/ron/folds.scm b/queries/ron/folds.scm new file mode 100644 index 000000000..ae79583ea --- /dev/null +++ b/queries/ron/folds.scm @@ -0,0 +1,7 @@ +[ + (array) + (map) + (tuple) + (struct) + (block_comment) +] @fold diff --git a/queries/ron/highlights.scm b/queries/ron/highlights.scm new file mode 100644 index 000000000..869264305 --- /dev/null +++ b/queries/ron/highlights.scm @@ -0,0 +1,53 @@ +; Structs +;------------ + +(enum_variant) @constant +(struct_entry (identifier) @property) +(struct_entry (enum_variant (identifier) @constant)) +(struct_name (identifier)) @type + +(unit_struct) @type.builtin + + +; Literals +;------------ + +(string) @string +(boolean) @boolean +(integer) @number +(float) @float +(char) @character + + +; Comments +;------------ + +[ + (line_comment) + (block_comment) +] @comment @spell + + +; Punctuation +;------------ + +["{" "}"] @punctuation.bracket + +["(" ")"] @punctuation.bracket + +["[" "]"] @punctuation.bracket + +[ + "," + ":" +] @punctuation.delimiter + +[ + "-" +] @operator + +; Special +;------------ + +(escape_sequence) @string.escape +(ERROR) @error diff --git a/queries/ron/indents.scm b/queries/ron/indents.scm new file mode 100644 index 000000000..84701a7e9 --- /dev/null +++ b/queries/ron/indents.scm @@ -0,0 +1,12 @@ +[ + (array) + (map) + (tuple) + (struct) +] @indent + +[ "{" "}" ] @branch + +[ "(" ")" ] @branch + +[ "[" "]" ] @branch diff --git a/queries/ron/injections.scm b/queries/ron/injections.scm new file mode 100644 index 000000000..e48ce9af3 --- /dev/null +++ b/queries/ron/injections.scm @@ -0,0 +1,4 @@ +[ + (line_comment) + (block_comment) +] @comment diff --git a/queries/ron/locals.scm b/queries/ron/locals.scm new file mode 100644 index 000000000..de90d35fd --- /dev/null +++ b/queries/ron/locals.scm @@ -0,0 +1,12 @@ +(source_file) @scope +(source_file (array) @scope) +(source_file (map) @scope) +(source_file (struct) @scope) +(source_file (tuple) @scope) + +(identifier) @reference + +(struct_entry (identifier) @definition.field) +(struct_entry (identifier) @definition.enum (enum_variant)) + +(struct (struct_name) @definition.type) |
