diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2022-03-01 10:47:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 10:47:20 -0700 |
commit | ed1a9c310df178e1163c910f70b194a657ad055a (patch) | |
tree | d714b25b37c32f92871566d153a8e8e8f4aeee5c | |
parent | 770b9f3c3b2d236ea3e1a480a2b06a9b8846508f (diff) | |
download | rneovim-ed1a9c310df178e1163c910f70b194a657ad055a.tar.gz rneovim-ed1a9c310df178e1163c910f70b194a657ad055a.tar.bz2 rneovim-ed1a9c310df178e1163c910f70b194a657ad055a.zip |
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.
-rw-r--r-- | src/nvim/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index b02ebbe030..d0b3a435c3 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -357,7 +357,7 @@ int main(int argc, char **argv) // Execute --cmd arguments. 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 // ftplugins run before FileType autocommands defined in the init file (which allows those // autocommands to overwrite settings from ftplugins). @@ -368,7 +368,7 @@ int main(int argc, char **argv) source_startup_scripts(¶ms); // 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 // off. filetype_maybe_enable(); |