mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
feat: add ssh config
This commit is contained in:
parent
6f3f89a6dd
commit
c0f4363b72
6 changed files with 121 additions and 0 deletions
|
|
@ -542,6 +542,9 @@
|
||||||
"squirrel": {
|
"squirrel": {
|
||||||
"revision": "e8b5835296f931bcaa1477d3c5a68a0c5c2ba034"
|
"revision": "e8b5835296f931bcaa1477d3c5a68a0c5c2ba034"
|
||||||
},
|
},
|
||||||
|
"ssh_config": {
|
||||||
|
"revision": "f1039c88c488f77a10a616c6de5ec1c4c6e8572f"
|
||||||
|
},
|
||||||
"starlark": {
|
"starlark": {
|
||||||
"revision": "c45ce2b39062bbd12ea1c210bd200db250efb24a"
|
"revision": "c45ce2b39062bbd12ea1c210bd200db250efb24a"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1597,6 +1597,15 @@ list.squirrel = {
|
||||||
maintainers = { "@amaanq" },
|
maintainers = { "@amaanq" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.ssh_config = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/ObserverOfTime/tree-sitter-ssh-config",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
filetype = "sshconfig",
|
||||||
|
maintainers = { "@ObserverOfTime" },
|
||||||
|
}
|
||||||
|
|
||||||
list.starlark = {
|
list.starlark = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/amaanq/tree-sitter-starlark",
|
url = "https://github.com/amaanq/tree-sitter-starlark",
|
||||||
|
|
|
||||||
4
queries/ssh_config/folds.scm
Normal file
4
queries/ssh_config/folds.scm
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[
|
||||||
|
(host_declaration)
|
||||||
|
(match_declaration)
|
||||||
|
] @fold
|
||||||
81
queries/ssh_config/highlights.scm
Normal file
81
queries/ssh_config/highlights.scm
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
; Literals
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
(pattern) @string.regex
|
||||||
|
|
||||||
|
(token) @character
|
||||||
|
|
||||||
|
[
|
||||||
|
(number)
|
||||||
|
(bytes)
|
||||||
|
(time)
|
||||||
|
] @number
|
||||||
|
|
||||||
|
[
|
||||||
|
(kex)
|
||||||
|
(mac)
|
||||||
|
(cipher)
|
||||||
|
(key_sig)
|
||||||
|
] @parameter
|
||||||
|
|
||||||
|
[
|
||||||
|
; generic
|
||||||
|
"yes" "no"
|
||||||
|
"ask" "auto"
|
||||||
|
"none" "any"
|
||||||
|
; 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) @text.uri
|
||||||
|
|
||||||
|
; Keywords
|
||||||
|
|
||||||
|
[ "Host" "Match" ] @keyword
|
||||||
|
|
||||||
|
(parameter keyword: _ @keyword)
|
||||||
|
|
||||||
|
(host_declaration argument: _ @namespace)
|
||||||
|
|
||||||
|
(match_declaration
|
||||||
|
(condition criteria: _ @attribute))
|
||||||
|
|
||||||
|
"all" @attribute
|
||||||
|
|
||||||
|
; Misc
|
||||||
|
|
||||||
|
[
|
||||||
|
"SSH_AUTH_SOCK"
|
||||||
|
(variable)
|
||||||
|
] @constant
|
||||||
|
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
(ERROR) @error
|
||||||
|
|
||||||
|
; Punctuation
|
||||||
|
|
||||||
|
[ "${" "}" ] @punctuation.special
|
||||||
|
|
||||||
|
[ "\"" "," ":" "@" ] @punctuation.delimiter
|
||||||
|
|
||||||
|
[ "=" "!" "+" "-" "^" ] @operator
|
||||||
|
|
||||||
|
[ "*" "?" ] @character.special
|
||||||
7
queries/ssh_config/indents.scm
Normal file
7
queries/ssh_config/indents.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
[
|
||||||
|
(host_declaration)
|
||||||
|
(match_declaration)
|
||||||
|
] @indent.begin
|
||||||
|
|
||||||
|
; incomplete declarations
|
||||||
|
(ERROR . [ "Host" "Match" ]) @indent.begin
|
||||||
17
queries/ssh_config/injections.scm
Normal file
17
queries/ssh_config/injections.scm
Normal file
|
|
@ -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"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue