diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /runtime/queries/bash | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'runtime/queries/bash')
-rw-r--r-- | runtime/queries/bash/highlights.scm | 55 | ||||
-rw-r--r-- | runtime/queries/bash/injections.scm | 3 |
2 files changed, 32 insertions, 26 deletions
diff --git a/runtime/queries/bash/highlights.scm b/runtime/queries/bash/highlights.scm index b4360ce7e1..feb0e038ea 100644 --- a/runtime/queries/bash/highlights.scm +++ b/runtime/queries/bash/highlights.scm @@ -68,10 +68,6 @@ argument: "$" @string) ; bare dollar (concatenation - [ - (simple_expansion) - (expansion) - ] (word) @string) [ @@ -110,7 +106,15 @@ ; trap -l ((word) @constant.builtin - (#match? @constant.builtin "^SIG(HUP|INT|QUIT|ILL|TRAP|ABRT|BUS|FPE|KILL|USR[12]|SEGV|PIPE|ALRM|TERM|STKFLT|CHLD|CONT|STOP|TSTP|TT(IN|OU)|URG|XCPU|XFSZ|VTALRM|PROF|WINCH|IO|PWR|SYS|RTMIN([+]([1-9]|1[0-5]))?|RTMAX(-([1-9]|1[0-4]))?)$")) + (#any-of? @constant.builtin + "SIGHUP" "SIGINT" "SIGQUIT" "SIGILL" "SIGTRAP" "SIGABRT" "SIGBUS" "SIGFPE" "SIGKILL" "SIGUSR1" + "SIGSEGV" "SIGUSR2" "SIGPIPE" "SIGALRM" "SIGTERM" "SIGSTKFLT" "SIGCHLD" "SIGCONT" "SIGSTOP" + "SIGTSTP" "SIGTTIN" "SIGTTOU" "SIGURG" "SIGXCPU" "SIGXFSZ" "SIGVTALRM" "SIGPROF" "SIGWINCH" + "SIGIO" "SIGPWR" "SIGSYS" "SIGRTMIN" "SIGRTMIN+1" "SIGRTMIN+2" "SIGRTMIN+3" "SIGRTMIN+4" + "SIGRTMIN+5" "SIGRTMIN+6" "SIGRTMIN+7" "SIGRTMIN+8" "SIGRTMIN+9" "SIGRTMIN+10" "SIGRTMIN+11" + "SIGRTMIN+12" "SIGRTMIN+13" "SIGRTMIN+14" "SIGRTMIN+15" "SIGRTMAX-14" "SIGRTMAX-13" + "SIGRTMAX-12" "SIGRTMAX-11" "SIGRTMAX-10" "SIGRTMAX-9" "SIGRTMAX-8" "SIGRTMAX-7" "SIGRTMAX-6" + "SIGRTMAX-5" "SIGRTMAX-4" "SIGRTMAX-3" "SIGRTMAX-2" "SIGRTMAX-1" "SIGRTMAX")) ((word) @boolean (#any-of? @boolean "true" "false")) @@ -120,10 +124,15 @@ (test_operator) @operator (command_substitution - "$(" @punctuation.bracket) + "$(" @punctuation.special + ")" @punctuation.special) (process_substitution - "<(" @punctuation.bracket) + [ + "<(" + ">(" + ] @punctuation.special + ")" @punctuation.special) (arithmetic_expansion [ @@ -156,27 +165,21 @@ (command_name (word) @function.call) -((command_name - (word) @function.builtin) - ; format-ignore +(command_name + (word) @function.builtin (#any-of? @function.builtin - "alias" "bg" "bind" "break" "builtin" "caller" "cd" - "command" "compgen" "complete" "compopt" "continue" - "coproc" "dirs" "disown" "echo" "enable" "eval" - "exec" "exit" "fc" "fg" "getopts" "hash" "help" - "history" "jobs" "kill" "let" "logout" "mapfile" - "popd" "printf" "pushd" "pwd" "read" "readarray" - "return" "set" "shift" "shopt" "source" "suspend" - "test" "time" "times" "trap" "type" "typeset" - "ulimit" "umask" "unalias" "wait")) + "alias" "bg" "bind" "break" "builtin" "caller" "cd" "command" "compgen" "complete" "compopt" + "continue" "coproc" "dirs" "disown" "echo" "enable" "eval" "exec" "exit" "fc" "fg" "getopts" + "hash" "help" "history" "jobs" "kill" "let" "logout" "mapfile" "popd" "printf" "pushd" "pwd" + "read" "readarray" "return" "set" "shift" "shopt" "source" "suspend" "test" "time" "times" + "trap" "type" "typeset" "ulimit" "umask" "unalias" "wait")) (command - argument: - [ - (word) @variable.parameter - (concatenation - (word) @variable.parameter) - ]) + argument: [ + (word) @variable.parameter + (concatenation + (word) @variable.parameter) + ]) (number) @number @@ -225,5 +228,5 @@ ((program . - (comment) @keyword.directive) + (comment) @keyword.directive @nospell) (#lua-match? @keyword.directive "^#!/")) diff --git a/runtime/queries/bash/injections.scm b/runtime/queries/bash/injections.scm new file mode 100644 index 0000000000..427b414958 --- /dev/null +++ b/runtime/queries/bash/injections.scm @@ -0,0 +1,3 @@ +(heredoc_redirect + (heredoc_body) @injection.content + (heredoc_end) @injection.language) |