VIM syntax coloring lua function name? -
i'm using vim via terminal (ssh) , want modify syntax coloring settings in vim make function_name yellow lua programming. unfortunately, can't figure out how that.
for example, in code below - want vim syntax color myfunc yellow
local function myfunc(arg1) ... end i've been able figure out how make function yellow, using code below:
hi luafunction ctermfg=yellow but code not color word myfunc yellow (and frankly, i'd rather not syntax color function @ all)
question: ideas how can syntax color function_name in lua?
another (more complex) regex match function name.
:hi luacustomfunction ctermfg=yellow :syn match luacustomfunction "\(\<function\>\)\@<=\s\+\s\+\s*(\@=" this uses look-behind match word function. after 1 or more spaces highlight word has parenthesis first non whitespace character after it.
this highlights function name. not highlight parenthesis.
i think if put these commands in .vim/after/syntax/lua.vim should work.
the problem putting them in vimrc sometime after vimrc sourced syntax highlighting file sourced , first line in there syn clear. (which wipes custom syntax highlighting set)
Comments
Post a Comment