I'm on neovim nightly and recently turned off treesitter. The highlighting is nice but it consistently was giving me segfaults while autocompleting, adds substantially to my startup time, and renders the editor completely unresponsive when opening large files. I think it's worth mentioning it's still early in development before highly recommending it, but it's cool to tinker with if you're in the mood for it.
I thought one of the points of neovim was to support true async stuff. So in theory, it should be possible to just open the file without syntax highlights but still be able to edit?
I'm not disagreeing with you (because I don't know the original 'points' of neovim and I've never used it) but plain vim now (as of v8 I think) supports 'async stuff'. I'm sure neovim has other benefits to some, but that alone at least I think is no longer one.
'All' of the (three or so?) neovim plugins I've come across wanting to use, and found Ah damn, 'neovim' in the name, work just fine in vanilla vim, FYI.
I don't know how much (or if anything) a plugin has to do to support it, but there's some kind of python RPC thing that allows it. IME it's been install that once, and neovim plugins 'just work'. (But I have only found/tried ones that explicitly mention it.)
Unfortunately doesn't work for me, it complains about not having definitions for cppType and cppStatement. Looking in the file it undefined them [1] [2], putting them back just messes with the formatting (as the code comments suggest). It looks like this was something that was changed from the original code [3].
It’s kind of janky, but my current strategy is to parse my code base with libclang and dump a vim script file that adds all of the types, enums, function declarations etc. as literal syntax keywords. I also generate a tag file at the same time.
The default syntax highlighting for most of the languages I've used in vim is pretty bad. Usually people will download plugins to resolve it. The syntax highlighter for HTML also loads in the syntax highlighter for visual basic for reasons I don't really understand.
More likely due to ASP, VBScript mixed into HTML server-side much like PHP.
VBScript could, and occasionally was, used client-side, but it was very rare in my experience. Outside of articles pushed by MS the “same language on server and client” angle didn't hold enough water to override the “only supported by IE” issue even when IE had ~90% market share in the early 2000s.
I havent used syntax highlighting in 8 years or so (global-font-lock-mode 0)
highly recommend it, if you could try.
for example this code[1]:
// the code will run twice
bool panic = true
while (true) {
panic = !panic;
if (panic) break;
}
I can argue is easier to read without highlighting.
I think colors break the flow of code in unintended ways, and mistreat comments (either overvalue with some pink color or undervalue with some toned down gray), and almost all themes make keywords extremely important.
That code is even easier to read with semantic highlighting than "basic" syntax highlighting. That said, syntax highlighting definitely helps when handling embedded strings, differentiating between value types, figuring out if something is a macro, function or global variable (which is important, as in a language like C++, the behaviour of `foo(x++)` depends on which of the above it is)
Highlighting doesn't tell you what's important, it tells you what's different. You should find a scheme that roughly weighs what's important to you;
AFAIK vimscript after/syntax/ files still work fine with neovim. But if you're on neovim 0.5+ I would recommend using the tree-sitter highlighting integration instead :)
The parentheses color are not caused by this script, but by my usage of rainbow parentheses (some variant of https://github.com/luochen1990/rainbow) which I have configured for my usual light background vim theme.
I did not spend time to set up a more empty vim configuration to take the screenshots.
The script does not introduce any new colors, it just changes what is highlighted as cType.
It does change the color of parentheses for "if" statements to be the same color as the keyword. I am undecided if I should keep that or not. Opinions from people not using rainbow or similar plugins are welcome.
I know its supported today natively in neovim. Not sure about regular vim or other editors/ides.
But its a massive improvement on the otherwise regex approach to syntax highlighting every editor takes.