mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
feat: add shellcheckrc
language (#14202)
This commit is contained in:
committed by
GitHub
parent
b309d72688
commit
6b73c3c550
55
runtime/queries/shellcheckrc/highlights.scm
Normal file
55
runtime/queries/shellcheckrc/highlights.scm
Normal file
@@ -0,0 +1,55 @@
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
(boolean) @constant.builtin.boolean
|
||||
(integer) @constant.numeric.integer
|
||||
|
||||
[
|
||||
"disable"
|
||||
"enable"
|
||||
"extended-analysis"
|
||||
"external-sources"
|
||||
"source"
|
||||
"source-path"
|
||||
"shell"
|
||||
] @keyword
|
||||
|
||||
"=" @operator
|
||||
|
||||
[
|
||||
","
|
||||
"-"
|
||||
] @punctuation.delimiter
|
||||
|
||||
"SC" @special
|
||||
|
||||
(shell) @type.enum.variant
|
||||
|
||||
(all) @variable.builtin
|
||||
|
||||
(identifier) @label
|
||||
|
||||
(source_directive
|
||||
(identifier) @string.special.path)
|
||||
|
||||
(source_path_directive
|
||||
(identifier) @string.special.path)
|
||||
|
||||
(source_directive
|
||||
(identifier) @variable.builtin (#eq? @variable.builtin "SCRIPTDIR"))
|
||||
|
||||
(source_path_directive
|
||||
(identifier) @variable.builtin (#eq? @variable.builtin "SCRIPTDIR"))
|
||||
|
||||
(enable_directive
|
||||
(identifier) @diagnostic.error
|
||||
(#not-any-of? @diagnostic.error
|
||||
"add-default-case"
|
||||
"avoid-nullary-conditions"
|
||||
"check-extra-masked-returns"
|
||||
"check-set-e-suppressed"
|
||||
"check-unassigned-uppercase"
|
||||
"deprecate-which"
|
||||
"quote-safe-variables"
|
||||
"require-double-brackets"
|
||||
"require-variable-braces"
|
||||
))
|
2
runtime/queries/shellcheckrc/injections.scm
Normal file
2
runtime/queries/shellcheckrc/injections.scm
Normal file
@@ -0,0 +1,2 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
13
runtime/queries/shellcheckrc/textobjects.scm
Normal file
13
runtime/queries/shellcheckrc/textobjects.scm
Normal file
@@ -0,0 +1,13 @@
|
||||
(comment) @comment.inside
|
||||
(comment)+ @comment.around
|
||||
|
||||
|
||||
[
|
||||
(disable_directive)
|
||||
(enable_directive)
|
||||
(extended_analysis_directive)
|
||||
(external_sources_directive)
|
||||
(source_directive)
|
||||
(source_path_directive)
|
||||
(shell_directive)
|
||||
] @entry.around
|
Reference in New Issue
Block a user