mirror of
https://github.com/neovim/neovim.git
synced 2026-11-06 13:26:57 +00:00
related: vim/vim#21387 https://github.com/vim/vim/commit/ca0610c14f11e75d720fbe0cc17d645b30d768a4 Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
36 lines
1.5 KiB
VimL
36 lines
1.5 KiB
VimL
" Vim syntax file
|
|
" Language: OpenSSH public key
|
|
" Author: Fionn Fitzmaurice (github.com/fionn)
|
|
" Maintainer: Fionn Fitzmaurice (github.com/fionn)
|
|
" License: Vim & Apache 2.0
|
|
" Last Change: 2026 Jun 28
|
|
" 2026 Sep 27 by Vim project: Add a new SSH key type
|
|
" 2026 Sep 28 by Vim project: update syntax file
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
syn iskeyword _,.,@-@,-,a-z,A-Z,48-57
|
|
|
|
syn keyword sshKeyType ssh-mldsa44-ed25519 nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType ssh-mldsa44-ed25519@openssh.com nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType ssh-ed25519 nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType sk-ssh-ed25519@openssh.com nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType ecdsa-sha2-nistp256 nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType ecdsa-sha2-nistp384 nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType ecdsa-sha2-nistp521 nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType sk-ecdsa-sha2-nistp256@openssh.com nextgroup=sshKeyBase64Encoded skipwhite
|
|
syn keyword sshKeyType ssh-rsa nextgroup=sshKeyBase64Encoded skipwhite
|
|
|
|
syn match sshKeyBase64Encoded "AAAA[a-zA-Z0-9/+]\{64,8000}=\{,2}" contained nextgroup=sshKeyComment
|
|
syn match sshKeyComment ".*$" contained
|
|
|
|
syn match sshKeyComment "#.*$"
|
|
|
|
hi def link sshKeyType Type
|
|
hi def link sshKeyBase64Encoded String
|
|
hi def link sshKeyComment Comment
|
|
|
|
let b:current_syntax = "sshpublickey"
|