aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 16700d20ab..621b93f9cc 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -367,11 +367,19 @@ int main(int argc, char **argv)
// Execute --cmd arguments.
exe_pre_commands(&params);
+ // If using the runtime (-u is not NONE), enable syntax & filetype plugins.
+ bool enable_syntax =
+ (params.use_vimrc == NULL || !strequal(params.use_vimrc, "NONE"));
+
+ // Source syncolor.vim to set up default UI highlights
+ if (enable_syntax) {
+ source_runtime((char_u *)"syntax/syncolor.vim", DIP_ALL);
+ }
+
// Source startup scripts.
source_startup_scripts(&params);
- // If using the runtime (-u is not NONE), enable syntax & filetype plugins.
- if (params.use_vimrc == NULL || !strequal(params.use_vimrc, "NONE")) {
+ if (enable_syntax) {
// Does ":filetype plugin indent on".
filetype_maybe_enable();
// Sources syntax/syntax.vim, which calls `:filetype on`.