aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-14 17:20:55 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-14 17:20:55 -0500
commite3bf1385e69911e39c3f3a753d4c7db936328d7c (patch)
tree8ee4ddef759fd8b995ca5672eaf9bd537faa4dd5 /src/nvim/main.c
parent75f6817a5161949ca2ab08e36b8e0772b8d7da16 (diff)
parentcc2dce45d09fab2ec2269924942fdca7d5643e63 (diff)
downloadrneovim-e3bf1385e69911e39c3f3a753d4c7db936328d7c.tar.gz
rneovim-e3bf1385e69911e39c3f3a753d4c7db936328d7c.tar.bz2
rneovim-e3bf1385e69911e39c3f3a753d4c7db936328d7c.zip
Merge pull request #4252 from justinmk/filetype
defaults: Enable filetypes, syntax
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..d3cdfe3edf 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 & filetype plugins.
+ if (params.use_vimrc != NULL && strcmp(params.use_vimrc, "NONE") != 0) {
+ // Does ":filetype plugin indent on".
+ filetype_maybe_enable();
+ // Sources syntax/syntax.vim, which calls `:filetype on`.
+ syn_maybe_on();
+ }
+
/*
* Read all the plugin files.
* Only when compiled with +eval, since most plugins need it.