aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorFelipe Morales <hel.sheep@gmail.com>2015-05-16 04:10:38 -0300
committerJustin M. Keyes <justinkz@gmail.com>2016-02-14 15:20:31 -0500
commit50e129f5a70bf291e6ec3afb7927e68e1f98e790 (patch)
treeb74f6484bf69932ceecb42cb8df1645e1c69ea1b /src/nvim/main.c
parent75f6817a5161949ca2ab08e36b8e0772b8d7da16 (diff)
downloadrneovim-50e129f5a70bf291e6ec3afb7927e68e1f98e790.tar.gz
rneovim-50e129f5a70bf291e6ec3afb7927e68e1f98e790.tar.bz2
rneovim-50e129f5a70bf291e6ec3afb7927e68e1f98e790.zip
defaults: Enable syntax and filetype plugins.
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.