-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is luaFuncCall linked to PreProc instead of Function? #19
Comments
It's also relevant to look at other language's syntax setup since multilingual vim users will benefit from having consistent highlighting behaviour between languages (their syntax files using vim's group names to mean the same thing). In a survey of vim-polyglot's syntax plugins (where lua is provided by this repo), languages that define some function Call use a wide mix, but only typescript also uses PreProc:
|
I've also found it confusing because it's inconsistent with every other syntax file I've used so far. FWIW, I have the following in my hi link luaFuncKeyword Statement
hi link luaLocal Statement
hi link luaBuiltIn Statement
hi link luaFuncCall Function
hi link luaSpecialValue Function
hi link luaFuncTable Identifier This gives me a much cleaner syntax highlighting. EDIT hi! def link luaFuncKeyword Statement
hi! def link luaLocal Statement
hi! def link luaBuiltIn Statement
hi! def link luaFuncCall Function
hi! def link luaSpecialValue Function
hi! def link luaFuncTable Identifier |
@idbrii half of my colorscheme is finding and fixing those, so that all the colors I choose show up where users expect 😅 Imho going by @bfrg if you're interested, here is my list of overrides for this plugin. I go back and forth as to what |
I've used it without thinking for a while, but recently realized why lua looks weird: function calls don't use the colors for functions.
luaSpecialValue
(built-in functions likeipairs
) also usesPreProc
which makes them look the same. However, fortable.insert
table
isluaSpecialTable
andinsert
isluaFuncCall
instead ofluaSpecialValue
. If not for that inconsistency, it'd be nice for built-ins to stand out.vim help says Function is:
I can see how that might be interpreted as "names in definitions" and not "names in uses", but using PreProc doesn't make sense to me.
Seems like ideally there's two changes to solve this:
The text was updated successfully, but these errors were encountered: