mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
startup: do "syntax enable" instead of "syntax on"
"syntax on" overwrites existing highlight groups, while "syntax enable" just sets missing groups. This change prevents user defined highlights in init.vim/lua to get overwritten. The manual recommends "syntax enable" for new configurations anyway, "on" command was probably used as it is the implicit default.
This commit is contained in:
@@ -3469,13 +3469,13 @@ static void syn_cmd_onoff(exarg_T *eap, char *name)
|
||||
}
|
||||
}
|
||||
|
||||
void syn_maybe_on(void)
|
||||
void syn_maybe_enable(void)
|
||||
{
|
||||
if (!did_syntax_onoff) {
|
||||
exarg_T ea;
|
||||
ea.arg = (char_u *)"";
|
||||
ea.skip = false;
|
||||
syn_cmd_onoff(&ea, "syntax");
|
||||
syn_cmd_enable(&ea, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user