Commit: runtime(vim): fix syntax vim bug (Close #14858) (#14861)

2 views
Skip to first unread message

Christian Brabandt

unread,
May 27, 2024, 9:45:13 AM5/27/24
to vim...@googlegroups.com
runtime(vim): fix syntax vim bug (Close #14858) (#14861)

Commit: https://github.com/vim/vim/commit/c984b2fd9ddd4107006a698fe81ad7ae22208620
Author: h_east <h.eas...@gmail.com>
Date: Mon May 27 22:40:25 2024 +0900

runtime(vim): fix syntax vim bug (Close https://github.com/vim/vim/issues/14858) (https://github.com/vim/vim/issues/14861)

Signed-off-by: h-east <h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim
index d320bdbda..4843aacac 100644
--- a/runtime/syntax/generator/gen_syntax_vim.vim
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -464,6 +464,10 @@ function! s:parse_vim_hlgroup(li)
let item.type = 'both'
call add(a:li, copy(item))

+ " "Conceal" is an option and cannot be used as keyword, so remove it.
+ " (Separately specified as 'syn match' in vim.vim.base).
+ call filter(a:li, {idx, val -> val.name !=# 'Conceal'})
+
quit!

if empty(a:li)
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index 90e1ee59b..7611ef7a1 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -70,6 +70,7 @@ syn keyword vimGroup contained Comment Constant String Character Number Boolean

" Default highlighting groups {{{2
" GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR=''
+syn match vimHLGroup contained "\<Conceal\>"
syn case match

" Function Names {{{2
Reply all
Reply to author
Forward
0 new messages