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/foam/highlights.scm | |
| 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/foam/highlights.scm')
| -rw-r--r-- | runtime/queries/foam/highlights.scm | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/runtime/queries/foam/highlights.scm b/runtime/queries/foam/highlights.scm new file mode 100644 index 000000000..9c96f196e --- /dev/null +++ b/runtime/queries/foam/highlights.scm @@ -0,0 +1,64 @@ +; Comments +(comment) @comment @spell + +; Generic Key-value pairs and dictionary keywords +(key_value + keyword: (identifier) @function) + +(dict + key: (identifier) @type) + +; Macros +(macro + "$" @keyword.conditional + (prev_scope)* @keyword.conditional + (identifier)* @module) + +; Directives +"#" @keyword.conditional + +(preproc_call + directive: (identifier)* @keyword.conditional + argument: (identifier)* @module) + +((preproc_call + argument: (identifier)* @module) @keyword.conditional + (#eq? @keyword.conditional "ifeq")) + +((preproc_call) @keyword.conditional + (#any-of? @keyword.conditional "else" "endif")) + +; Literals +(number_literal) @number.float + +(string_literal) @string + +(escape_sequence) @string.escape + +(boolean) @boolean + +; Treat [m^2 s^-2] the same as if it was put in numbers format +(dimensions + dimension: (identifier) @number.float) + +; Punctuation +[ + "(" + ")" + "[" + "]" + "{" + "}" + "#{" + "#}" + "|-" + "-|" + "<!--(" + ")-->" + "$$" +] @punctuation.bracket + +";" @punctuation.delimiter + +((identifier) @constant.builtin + (#any-of? @constant.builtin "uniform" "non-uniform" "and" "or")) |
