Skip to content

Commit 06d8d16

Browse files
committed
Improve jsClassMethodDefinition matches
Currently in a class definition, you can actually have a method called `get`. However with our match of `get` `set` and `static` as keywords, we broke the ability to properly support those method names. This should fix those cases.
1 parent d00e8dd commit 06d8d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ syntax match jsArrowFuncArgs /([^()]*)\s*\(=>\)\@=/ skipempty skipwhite conta
221221

222222
syntax keyword jsClassKeywords extends class contained
223223
syntax match jsClassNoise /\./ contained
224-
syntax keyword jsClassMethodDefinitions get set static contained nextgroup=jsFuncName skipwhite skipempty
224+
syntax match jsClassMethodDefinitions /\%(get\|set\|static\)\%( \k\+\)\@=/ contained nextgroup=jsFuncName skipwhite skipempty
225225
syntax match jsClassDefinition /\<class\>\%( [a-zA-Z_$][0-9a-zA-Z_$ \n.]*\)*/ contains=jsClassKeywords,jsClassNoise nextgroup=jsClassBlock skipwhite skipempty
226226

227227
" Define the default highlighting.

0 commit comments

Comments
 (0)