aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c4
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(&params);
- 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(&params);
// 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();