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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index a8c2cebbbd..97cccb2e25 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -332,6 +332,14 @@ int main(int argc, char **argv)
/* Source startup scripts. */
source_startup_scripts(&params);
+ // If using the runtime (-u is not NONE), enable syntax and filetype plugins
+ if (params.use_vimrc != NULL && strcmp(params.use_vimrc, "NONE") != 0) {
+ // Do this before syntax/syntax.vim (which calls `:filetype on`).
+ force_enable_filetype();
+ // Enable syntax highlighting.
+ do_source((char_u *)SYNTAX_FILE, false, DOSO_NONE);
+ }
+
/*
* Read all the plugin files.
* Only when compiled with +eval, since most plugins need it.