diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/ron | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'runtime/queries/ron')
| -rw-r--r-- | runtime/queries/ron/folds.scm | 7 | ||||
| -rw-r--r-- | runtime/queries/ron/highlights.scm | 62 | ||||
| -rw-r--r-- | runtime/queries/ron/indents.scm | 21 | ||||
| -rw-r--r-- | runtime/queries/ron/injections.scm | 5 | ||||
| -rw-r--r-- | runtime/queries/ron/locals.scm | 25 |
5 files changed, 120 insertions, 0 deletions
diff --git a/runtime/queries/ron/folds.scm b/runtime/queries/ron/folds.scm new file mode 100644 index 000000000..ae79583ea --- /dev/null +++ b/runtime/queries/ron/folds.scm @@ -0,0 +1,7 @@ +[ + (array) + (map) + (tuple) + (struct) + (block_comment) +] @fold diff --git a/runtime/queries/ron/highlights.scm b/runtime/queries/ron/highlights.scm new file mode 100644 index 000000000..96507323b --- /dev/null +++ b/runtime/queries/ron/highlights.scm @@ -0,0 +1,62 @@ +; Structs +;------------ +(enum_variant) @constant + +(struct_entry + (identifier) @variable.member) + +(struct_entry + (enum_variant + (identifier) @constant)) + +(struct_name + (identifier)) @type + +(unit_struct) @type.builtin + +; Literals +;------------ +(string) @string + +(boolean) @boolean + +(integer) @number + +(float) @number.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 diff --git a/runtime/queries/ron/indents.scm b/runtime/queries/ron/indents.scm new file mode 100644 index 000000000..689d01fac --- /dev/null +++ b/runtime/queries/ron/indents.scm @@ -0,0 +1,21 @@ +[ + (array) + (map) + (tuple) + (struct) +] @indent.begin + +[ + "{" + "}" +] @indent.branch + +[ + "(" + ")" +] @indent.branch + +[ + "[" + "]" +] @indent.branch diff --git a/runtime/queries/ron/injections.scm b/runtime/queries/ron/injections.scm new file mode 100644 index 000000000..3cd6aac8e --- /dev/null +++ b/runtime/queries/ron/injections.scm @@ -0,0 +1,5 @@ +([ + (line_comment) + (block_comment) +] @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/ron/locals.scm b/runtime/queries/ron/locals.scm new file mode 100644 index 000000000..81e38d5ed --- /dev/null +++ b/runtime/queries/ron/locals.scm @@ -0,0 +1,25 @@ +(source_file) @local.scope + +(source_file + (array) @local.scope) + +(source_file + (map) @local.scope) + +(source_file + (struct) @local.scope) + +(source_file + (tuple) @local.scope) + +(identifier) @local.reference + +(struct_entry + (identifier) @local.definition.field) + +(struct_entry + (identifier) @local.definition.enum + (enum_variant)) + +(struct + (struct_name) @local.definition.type) |
