diff options
Diffstat (limited to 'runtime/queries/ssh_config')
| -rw-r--r-- | runtime/queries/ssh_config/folds.scm | 4 | ||||
| -rw-r--r-- | runtime/queries/ssh_config/highlights.scm | 108 | ||||
| -rw-r--r-- | runtime/queries/ssh_config/indents.scm | 12 | ||||
| -rw-r--r-- | runtime/queries/ssh_config/injections.scm | 17 | ||||
| -rw-r--r-- | runtime/queries/ssh_config/locals.scm | 7 |
5 files changed, 148 insertions, 0 deletions
diff --git a/runtime/queries/ssh_config/folds.scm b/runtime/queries/ssh_config/folds.scm new file mode 100644 index 000000000..659835657 --- /dev/null +++ b/runtime/queries/ssh_config/folds.scm @@ -0,0 +1,4 @@ +[ + (host_declaration) + (match_declaration) +] @fold diff --git a/runtime/queries/ssh_config/highlights.scm b/runtime/queries/ssh_config/highlights.scm new file mode 100644 index 000000000..b58360b69 --- /dev/null +++ b/runtime/queries/ssh_config/highlights.scm @@ -0,0 +1,108 @@ +; Literals +(string) @string + +(pattern) @string.regexp + +(token) @character + +[ + (number) + (bytes) + (time) +] @number + +[ + (kex) + (mac) + (cipher) + (key_sig) +] @variable.parameter + +[ + ; generic + "yes" + "no" + "ask" + "auto" + "none" + "any" + ; CanonicalizeHostname + "always" + ; ControlMaster + "autoask" + ; FingerprintHash + "md5" + "sha256" + ; PubkeyAuthentication + "unbound" + "host-bound" + ; RequestTTY + "force" + ; SessionType + "subsystem" + "default" + ; StrictHostKeyChecking + "accept-new" + "off" + ; Tunnel + "point-to-point" + "ethernet" + (ipqos) + (verbosity) + (facility) + (authentication) +] @constant.builtin + +(uri) @string.special.url + +; Keywords +[ + "Host" + "Match" +] @keyword + +(parameter + keyword: _ @keyword) + +(host_declaration + argument: _ @module) + +(match_declaration + (condition + criteria: _ @attribute)) + +"all" @attribute + +; Misc +[ + "SSH_AUTH_SOCK" + (variable) +] @constant + +(comment) @comment @spell + +; Punctuation +[ + "${" + "}" +] @punctuation.special + +[ + "\"" + "," + ":" + "@" +] @punctuation.delimiter + +[ + "=" + "!" + "+" + "-" + "^" +] @operator + +[ + "*" + "?" +] @character.special diff --git a/runtime/queries/ssh_config/indents.scm b/runtime/queries/ssh_config/indents.scm new file mode 100644 index 000000000..760707f17 --- /dev/null +++ b/runtime/queries/ssh_config/indents.scm @@ -0,0 +1,12 @@ +[ + (host_declaration) + (match_declaration) +] @indent.begin + +; incomplete declarations +(ERROR + . + [ + "Host" + "Match" + ]) @indent.begin diff --git a/runtime/queries/ssh_config/injections.scm b/runtime/queries/ssh_config/injections.scm new file mode 100644 index 000000000..d1b24be61 --- /dev/null +++ b/runtime/queries/ssh_config/injections.scm @@ -0,0 +1,17 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +((condition + criteria: "exec" + argument: (string) @injection.content) + (#set! injection.language "bash")) + +((parameter + keyword: [ + "KnownHostsCommand" + "LocalCommand" + "RemoteCommand" + "ProxyCommand" + ] + argument: (string) @injection.content) + (#set! injection.language "bash")) diff --git a/runtime/queries/ssh_config/locals.scm b/runtime/queries/ssh_config/locals.scm new file mode 100644 index 000000000..a3309a9a6 --- /dev/null +++ b/runtime/queries/ssh_config/locals.scm @@ -0,0 +1,7 @@ +(parameter + keyword: "Tag" + argument: (string) @local.reference) + +(condition + criteria: "tagged" + argument: (pattern) @local.definition) |
