mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
fix: enable filetype detection and syntax highlighting with --clean (#17566)
--clean is supposed to emulate a "fresh install" and since Neovim enables filetype detection and syntax highlighting by default, these should be enabled when using --clean as well.
This commit is contained in:
parent
770b9f3c3b
commit
ed1a9c310d
@ -357,7 +357,7 @@ int main(int argc, char **argv)
|
|||||||
// Execute --cmd arguments.
|
// Execute --cmd arguments.
|
||||||
exe_pre_commands(¶ms);
|
exe_pre_commands(¶ms);
|
||||||
|
|
||||||
if (!vimrc_none) {
|
if (!vimrc_none || params.clean) {
|
||||||
// Sources ftplugin.vim and indent.vim. We do this *before* the user startup scripts to ensure
|
// Sources ftplugin.vim and indent.vim. We do this *before* the user startup scripts to ensure
|
||||||
// ftplugins run before FileType autocommands defined in the init file (which allows those
|
// ftplugins run before FileType autocommands defined in the init file (which allows those
|
||||||
// autocommands to overwrite settings from ftplugins).
|
// autocommands to overwrite settings from ftplugins).
|
||||||
@ -368,7 +368,7 @@ int main(int argc, char **argv)
|
|||||||
source_startup_scripts(¶ms);
|
source_startup_scripts(¶ms);
|
||||||
|
|
||||||
// If using the runtime (-u is not NONE), enable syntax & filetype plugins.
|
// If using the runtime (-u is not NONE), enable syntax & filetype plugins.
|
||||||
if (!vimrc_none) {
|
if (!vimrc_none || params.clean) {
|
||||||
// Sources filetype.lua and filetype.vim unless the user explicitly disabled it with :filetype
|
// Sources filetype.lua and filetype.vim unless the user explicitly disabled it with :filetype
|
||||||
// off.
|
// off.
|
||||||
filetype_maybe_enable();
|
filetype_maybe_enable();
|
||||||
|
Loading…
Reference in New Issue
Block a user