aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_ssh_config.lua
diff options
context:
space:
mode:
authorDuncan Lock <duncan.lock@gmail.com>2021-11-16 20:23:03 -0800
committerGitHub <noreply@github.com>2021-11-17 12:23:03 +0800
commit07ab38f038cfde37fe3c7011f07b72fb92c359b1 (patch)
treedc46c01e40fe0afafb5e1e8c53123499cf25cce0 /plugins/language_ssh_config.lua
parente51f8ce9abe404a018d1b27101dff9c1fc814425 (diff)
downloadlite-xl-plugins-07ab38f038cfde37fe3c7011f07b72fb92c359b1.tar.gz
lite-xl-plugins-07ab38f038cfde37fe3c7011f07b72fb92c359b1.zip
Add syntax highlighting for ssh & sshd config files (#85)
Diffstat (limited to 'plugins/language_ssh_config.lua')
-rw-r--r--plugins/language_ssh_config.lua58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/language_ssh_config.lua b/plugins/language_ssh_config.lua
new file mode 100644
index 0000000..666f3f3
--- /dev/null
+++ b/plugins/language_ssh_config.lua
@@ -0,0 +1,58 @@
+-- mod-version:2 -- lite-xl 2.0
+local syntax = require "core.syntax"
+
+syntax.add {
+ files = { "sshd?/?_?config$" },
+ comment = '#',
+ patterns = {
+ { pattern = "#.*\n", type = "comment" },
+ { pattern = "%d+", type = "number" },
+ { pattern = "[%a_][%w_]*", type = "symbol" },
+ { pattern = "@", type = "operator" },
+ },
+ symbols = {
+ -- ssh config
+ ["Host"] = "function",
+ ["ProxyCommand"] = "function",
+
+ ["HostName"] = "keyword",
+ ["IdentityFile"] = "keyword",
+ ["IdentitiesOnly"] = "keyword",
+ ["User"] = "keyword",
+ ["Port"] = "keyword",
+
+ ["ForwardAgent"] = "keyword",
+ ["ForwardX11"] = "keyword",
+ ["ForwardX11Trusted"] = "keyword",
+ ["HostbasedAuthentication"] = "keyword",
+ ["GSSAPIAuthentication"] = "keyword",
+ ["GSSAPIDelegateCredentials"] = "keyword",
+ ["GSSAPIKeyExchange"] = "keyword",
+ ["GSSAPITrustDNS"] = "keyword",
+ ["BatchMode"] = "keyword",
+ ["CheckHostIP"] = "keyword",
+ ["AddressFamily"] = "keyword",
+ ["ConnectTimeout"] = "keyword",
+ ["StrictHostKeyChecking"] = "keyword",
+ ["Ciphers"] = "keyword",
+ ["MACs"] = "keyword",
+ ["EscapeChar"] = "keyword",
+ ["Tunnel"] = "keyword",
+ ["TunnelDevice"] = "keyword",
+ ["PermitLocalCommand"] = "keyword",
+ ["VisualHostKey"] = "keyword",
+ ["RekeyLimit"] = "keyword",
+ ["SendEnv"] = "keyword",
+ ["HashKnownHosts"] = "keyword",
+ ["GSSAPIAuthentication"] = "keyword",
+
+ -- sshd config
+ ["Subsystem"] = "keyword2",
+
+
+ ["yes"] = "literal",
+ ["no"] = "literal",
+ ["any"] = "literal",
+ ["ask"] = "literal",
+ },
+}