diff options
| author | Tyler Miller <tmillr@proton.me> | 2023-06-01 02:38:29 -0700 |
|---|---|---|
| committer | ObserverOfTime <chronobserver@disroot.org> | 2023-06-03 23:54:28 +0300 |
| commit | 5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8 (patch) | |
| tree | 90400206013f9c97bf3e581694f4ecadd3b4c794 | |
| parent | Update parsers: elixir, racket, scheme (#4899) (diff) | |
| download | nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.tar nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.tar.gz nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.tar.bz2 nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.tar.lz nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.tar.xz nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.tar.zst nvim-treesitter-5ac8cf8ee596ddc29e0392e1ed28dbc5f10245d8.zip | |
fix(make/highlights): add `define` and operators
| -rw-r--r-- | queries/make/highlights.scm | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/queries/make/highlights.scm b/queries/make/highlights.scm index f94c567b2..17a100edf 100644 --- a/queries/make/highlights.scm +++ b/queries/make/highlights.scm @@ -37,18 +37,35 @@ (include_directive ["include" "-include"] @include) (variable_assignment - (word) @symbol) -(variable_assignment [ - "?=" - ":=" - "+=" - "=" + name: (word) @symbol + [ + "?=" + ":=" + "::=" +; ":::=" + "+=" + "=" ] @operator) +(shell_assignment + name: (word) @symbol + "!=" @operator) + +(define_directive + "define" @keyword + name: (word) @symbol + [ + "=" + ":=" + "::=" +; ":::=" + "?=" + "!=" + ]? @operator + "endef" @keyword) (variable_assignment - (word) @variable.builtin - (#any-of? @variable.builtin + (word) @variable.builtin (#any-of? @variable.builtin ".DEFAULT_GOAL" ".EXTRA_PREREQS" ".FEATURES" @@ -65,11 +82,9 @@ "SHELL" )) - ; Use string to match bash (variable_reference (word) @string) @operator - (shell_function ["$" "(" ")"] @operator "shell" @function.builtin) |
