Skip to content

Commit

Permalink
Update queries for makefile (helix-editor#6339)
Browse files Browse the repository at this point in the history
- update variable and ref as paramter
- add target as constant
- add inject for shell_text
  • Loading branch information
erasin authored and Schuyler Mortimer committed Jul 10, 2024
1 parent df1aa43 commit 8acdd0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runtime/queries/make/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
(raw_text)
] @string

(variable_assignment (word) @string)
(variable_assignment (word) @variable)
(shell_text
[(variable_reference (word) @variable.parameter)])

[
"ifeq"
Expand Down Expand Up @@ -139,6 +141,7 @@
function: "info"
(arguments (text) @info))


;; Install Command Categories
;; Others special variables
;; Variables Used by Implicit Rules
Expand Down Expand Up @@ -168,3 +171,5 @@
(targets
(word) @constant.macro
(#match? @constant.macro "^\.(PHONY|SUFFIXES|DEFAULT|PRECIOUS|INTERMEDIATE|SECONDARY|SECONDEXPANSION|DELETE_ON_ERROR|IGNORE|LOW_RESOLUTION_TIME|SILENT|EXPORT_ALL_VARIABLES|NOTPARALLEL|ONESHELL|POSIX)$"))

(targets (word) @constant)
3 changes: 3 additions & 0 deletions runtime/queries/make/injections.scm
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
((comment) @injection.content
(#set! injection.language "comment"))

((shell_text) @injection.content
(#set! injection.language "bash"))

0 comments on commit 8acdd0c

Please sign in to comment.