mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
runtime(vim): Update base-syntax file, improve class, enum and interface highlighting
- Enable folding of class, enum and interface declarations. - Highlight constructor names with the Function highlight group, like other special methods. - Mark function definitions using special method names as errors. - Highlight :type arguments. fixes: #14393#issuecomment-2042796198. closes: #13810 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ec0229414b
commit
818c641b6f
39
runtime/syntax/testdir/input/vim9_ex_enum_fold.vim
Normal file
39
runtime/syntax/testdir/input/vim9_ex_enum_fold.vim
Normal file
@@ -0,0 +1,39 @@
|
||||
vim9script
|
||||
# Vim :enum command
|
||||
# VIM_TEST_SETUP let g:vimsyn_folding = 'ef'
|
||||
# VIM_TEST_SETUP setl fdc=2 fdl=99 fdm=syntax
|
||||
|
||||
interface Interface1
|
||||
endinterface
|
||||
interface Interface2
|
||||
endinterface
|
||||
|
||||
enum Enum1
|
||||
endenum
|
||||
|
||||
export enum Enum2
|
||||
endenum
|
||||
|
||||
enum Enum3
|
||||
Value1,
|
||||
Value2,
|
||||
Value3
|
||||
endenum
|
||||
|
||||
enum Enum4
|
||||
Value1,
|
||||
Value2,
|
||||
Value3
|
||||
def Method1()
|
||||
enddef
|
||||
endenum
|
||||
|
||||
enum Enum5 implements Interface1, Interface2
|
||||
Value1,
|
||||
Value2,
|
||||
Value3
|
||||
def Method1()
|
||||
def Nested()
|
||||
enddef
|
||||
enddef
|
||||
endenum
|
Reference in New Issue
Block a user