From c7a63f35db6f682dbdf0c4c045fdd43a763d3ae4 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Mon, 4 Oct 2021 08:01:49 -0600 Subject: [PATCH] feat(startup): load builtin plugins with --clean #15893 Closes #15605 --- runtime/doc/starting.txt | 3 ++- src/nvim/main.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 87a48e6d2a..bb775ec884 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -90,10 +90,11 @@ argument. See |info-message| about capturing the text. *--clean* ---clean Equivalent to "-u NONE -i NONE": +--clean Mimics a fresh install of Nvim: - Skips initializations from files and environment variables. - No 'shada' file is read or written. - Excludes user directories from 'runtimepath' + - Loads builtin plugins, unlike "-u NONE -i NONE". *--noplugin* --noplugin Skip loading plugins. Resets the 'loadplugins' option. diff --git a/src/nvim/main.c b/src/nvim/main.c index f801351d2d..069c253bff 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -345,7 +345,8 @@ int main(int argc, char **argv) // Reset 'loadplugins' for "-u NONE" before "--cmd" arguments. // Allows for setting 'loadplugins' there. if (params.use_vimrc != NULL && strequal(params.use_vimrc, "NONE")) { - p_lpl = false; + // When using --clean we still want to load plugins + p_lpl = params.clean; } // Execute --cmd arguments.