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/devicetree | |
| 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/devicetree')
| -rw-r--r-- | runtime/queries/devicetree/folds.scm | 1 | ||||
| -rw-r--r-- | runtime/queries/devicetree/highlights.scm | 61 | ||||
| -rw-r--r-- | runtime/queries/devicetree/indents.scm | 12 | ||||
| -rw-r--r-- | runtime/queries/devicetree/injections.scm | 2 | ||||
| -rw-r--r-- | runtime/queries/devicetree/locals.scm | 4 |
5 files changed, 80 insertions, 0 deletions
diff --git a/runtime/queries/devicetree/folds.scm b/runtime/queries/devicetree/folds.scm new file mode 100644 index 000000000..206c4bed8 --- /dev/null +++ b/runtime/queries/devicetree/folds.scm @@ -0,0 +1 @@ +(node) @fold diff --git a/runtime/queries/devicetree/highlights.scm b/runtime/queries/devicetree/highlights.scm new file mode 100644 index 000000000..74ec89af1 --- /dev/null +++ b/runtime/queries/devicetree/highlights.scm @@ -0,0 +1,61 @@ +(comment) @comment @spell + +[ + (preproc_include) + (dtsi_include) +] @keyword.import + +(preproc_def) @constant.macro + +(preproc_function_def) @function.macro + +[ + (memory_reservation) + (file_version) +] @attribute + +[ + (string_literal) + (byte_string_literal) + (system_lib_string) +] @string + +(integer_literal) @number + +(identifier) @variable + +(node + (identifier) @module) + +(property + (identifier) @property) + +(node + label: (_) @label) + +(call_expression + (identifier) @function.macro) + +(reference) @label ; referencing labeled_item.identifier + +(unit_address) @constant + +"=" @operator + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" +] @punctuation.bracket + +[ + ";" + ":" + "," + "@" +] @punctuation.delimiter diff --git a/runtime/queries/devicetree/indents.scm b/runtime/queries/devicetree/indents.scm new file mode 100644 index 000000000..9740060ca --- /dev/null +++ b/runtime/queries/devicetree/indents.scm @@ -0,0 +1,12 @@ +[ + (node) + (property) + (integer_cells) +] @indent.begin + +[ + "}" + ">" +] @indent.branch + +(comment) @indent.ignore diff --git a/runtime/queries/devicetree/injections.scm b/runtime/queries/devicetree/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/runtime/queries/devicetree/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/devicetree/locals.scm b/runtime/queries/devicetree/locals.scm new file mode 100644 index 000000000..e33a81dfd --- /dev/null +++ b/runtime/queries/devicetree/locals.scm @@ -0,0 +1,4 @@ +[ + (node) + (integer_cells) +] @local.scope |
