runtime(vim): Update base syntax, match Neovim builtin functions

Match Neovim functions when has("nvim") is true or g:vimsyn_vim_features
contains "nvim".

Fixes issue #17884.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
Doug Kearns
2025-08-01 23:05:58 +10:00
committed by dkearns
parent b88f9e4a04
commit ee865249b1
17 changed files with 488 additions and 23 deletions

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jul 29
" Last Change: 2025 Aug 01
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -109,6 +109,7 @@ syn case match
" Function Names {{{2
" GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR=''
" Predefined variable names {{{2
" GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR=''
@ -120,6 +121,8 @@ syn case match
if s:has("nvim")
syn keyword vimOptionVarName contained channel inccommand mousescroll pumblend redrawdebug scrollback shada shadafile statuscolumn termpastefilter termsync winbar winblend winhighlight
syn keyword vimFuncName contained api_info buffer_exists buffer_name buffer_number chanclose chansend ctxget ctxpop ctxpush ctxset ctxsize dictwatcheradd dictwatcherdel file_readable highlight_exists highlightID jobclose jobpid jobresize jobsend jobstart jobstop jobwait last_buffer_nr menu_get msgpackdump msgpackparse reg_recorded rpcnotify rpcrequest rpcstart rpcstop serverstart serverstop sockconnect stdioopen stdpath termopen test_write_list_log wait
syn match vimFuncName contained "\<nvim_\w\+\>"
syn keyword vimVimVarName contained lua msgpack_types relnum stderr termrequest virtnum
endif