дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 01:01:17 +02:00
The legacy shell stream mode works from fixed word lists: local, declare and return were plain text, and so were function definitions and any command outside its ~70 builtins. The bundled tree-sitter-bash grammar now draws its highlights over the stream mode, as Kotlin's does: declaration keywords, function definition names, command names and variables. Command names get their own colour (--syn-shell-command, Color Scheme › Shell Script › Command), blue in light and orange in dark schemes, falling back to the function-call colour in colour themes.
57 рядки
772 B
Scheme
57 рядки
772 B
Scheme
; Shell scripts: drawn over the stream mode, which knows only fixed word lists.
|
|
; The last matching pattern wins.
|
|
|
|
[
|
|
(string)
|
|
(raw_string)
|
|
(ansi_c_string)
|
|
(translated_string)
|
|
(heredoc_body)
|
|
(heredoc_start)
|
|
] @string
|
|
|
|
[
|
|
(command_substitution)
|
|
(process_substitution)
|
|
(expansion)
|
|
(simple_expansion)
|
|
] @embedded
|
|
|
|
(comment) @comment
|
|
|
|
[
|
|
"case"
|
|
"do"
|
|
"done"
|
|
"elif"
|
|
"else"
|
|
"esac"
|
|
"fi"
|
|
"for"
|
|
"function"
|
|
"if"
|
|
"in"
|
|
"select"
|
|
"then"
|
|
"until"
|
|
"while"
|
|
"declare"
|
|
"export"
|
|
"local"
|
|
"readonly"
|
|
"typeset"
|
|
"unset"
|
|
"unsetenv"
|
|
] @keyword
|
|
|
|
(command_name) @function.command
|
|
(function_definition name: (word) @function.definition)
|
|
|
|
(variable_name) @variable
|
|
(special_variable_name) @variable
|
|
|
|
[
|
|
(number)
|
|
(file_descriptor)
|
|
] @number
|