aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-06-29 07:48:17 +0800
committerGitHub <noreply@github.com>2026-06-28 23:48:17 +0000
commit84cd87908e81da33c8daa5646668939d7ea6afa7 (patch)
tree05cc2b3ce12e4f51224a0099d8a47ff64a747b87 /runtime/lua/vim
parent4d18693c49aa997f0942de1c3d43cf23886b81b1 (diff)
downloadrneovim-84cd87908e81da33c8daa5646668939d7ea6afa7.tar.gz
rneovim-84cd87908e81da33c8daa5646668939d7ea6afa7.tar.bz2
rneovim-84cd87908e81da33c8daa5646668939d7ea6afa7.zip
vim-patch:9.2.0742: filetype: SSH keys and related filetypes not recognized (#40469)
Problem: filetype: SSH keys and related filetypes not recognized Solution: Detect sshpublickey, sshknownhosts sshauthorizedkeys and sshallowedsigners filetypes, add syntax scripts for those filetypes (Fionn Fitzmaurice) This adds syntax highlighting for SSH public keys, as well as related filetypes derived from this (SSH authorized keys, SSH known hosts and SSH allowed signers). Also add filetype detection based on the path and name. closes: vim/vim#20635 https://github.com/vim/vim/commit/6e66ebc0fdd7804db4baa076e62c78d208adaeaf Co-authored-by: Fionn Fitzmaurice <git@fionn.computer>
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/filetype.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 6c4e5fd43a..d04a355cf5 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1279,6 +1279,7 @@ local extension = {
srt = 'srt',
ssa = 'ssa',
ass = 'ssa',
+ allowed_signers = 'sshallowedsigners',
st = 'st',
ipd = 'starlark',
sky = 'starlark',
@@ -1981,8 +1982,9 @@ local filename = {
Snakefile = 'snakemake',
['.sqlite_history'] = 'sql',
['squid.conf'] = 'squid',
- ['ssh_config'] = 'sshconfig',
- ['sshd_config'] = 'sshdconfig',
+ allowed_signers = 'sshallowedsigners',
+ ssh_config = 'sshconfig',
+ sshd_config = 'sshdconfig',
['/etc/sudoers'] = 'sudoers',
['sudoers.tmp'] = 'sudoers',
['/etc/sysctl.conf'] = 'sysctl',
@@ -2181,9 +2183,11 @@ local pattern = {
['/etc/slp%.conf$'] = 'slpconf',
['/etc/slp%.reg$'] = 'slpreg',
['/etc/slp%.spi$'] = 'slpspi',
- ['/etc/sudoers%.d/'] = starsetf('sudoers'),
['/etc/ssh/ssh_config%.d/.*%.conf$'] = 'sshconfig',
['/etc/ssh/sshd_config%.d/.*%.conf$'] = 'sshdconfig',
+ ['^/etc/ssh/ssh_known_hosts$'] = 'sshknownhosts',
+ ['^/etc/ssh/.+%.pub$'] = 'sshpublickey',
+ ['/etc/sudoers%.d/'] = starsetf('sudoers'),
['/etc/sudoers$'] = 'sudoers',
['/etc/sysctl%.conf$'] = 'sysctl',
['/etc/sysctl%.d/.*%.conf$'] = 'sysctl',
@@ -2543,6 +2547,9 @@ local pattern = {
['/%.pinforc$'] = 'pinfo',
['^${HOME}/%.xinitrc$'] = 'sh',
['^${HOME}/%.xserverrc$'] = 'sh',
+ ['/%.ssh/authorized_keys$'] = 'sshauthorizedkeys',
+ ['/%.ssh/known_hosts$'] = 'sshknownhosts',
+ ['/%.ssh/.+%.pub$'] = 'sshpublickey',
['/%.cargo/credentials$'] = 'toml',
['/%.init/.*%.override$'] = 'upstart',
['/%.kube/kuberc$'] = 'yaml',