vim-plugins: honor the plugin manager re filetype and syntax
Currently, all the filetype and syntax are enabled *after* all the plugins has already been loaded. Whilst this is the case for Pathogen, it's not recommended when using VAM. This commit applies the recommendation for: - VAM[0]: The filetype and syntax are enabled *before* the plugins are loaded. - Pathogen[1]: The filetype and syntax are enabled *after* the plugins are loaded. - Plug[2]: The filetype and syntax are automatically enabled. [0]:d9e865f3c2 (recommended-setup)
[1]:a553410f1b/README.markdown (runtime-path-manipulation)
[2]:2f5f74e5e6/README.md (usage)
This commit is contained in:
parent
5f0327a6e0
commit
8dccb59bac
@ -208,6 +208,8 @@ let
|
||||
''
|
||||
let &rtp.=(empty(&rtp)?"":',')."${vimPlugins.pathogen.rtp}"
|
||||
execute pathogen#infect('${pluginsEnv}/{}')
|
||||
|
||||
filetype indent plugin on | syn on
|
||||
'');
|
||||
|
||||
/* vim-plug is an extremely popular vim plugin manager.
|
||||
@ -259,6 +261,8 @@ let
|
||||
|
||||
in assert builtins.hasAttr "vim-addon-manager" knownPlugins;
|
||||
''
|
||||
filetype indent plugin on | syn on
|
||||
|
||||
let g:nix_plugin_locations = {}
|
||||
${lib.concatMapStrings (plugin: ''
|
||||
let g:nix_plugin_locations['${plugin.pname}'] = "${plugin.rtp}"
|
||||
@ -329,10 +333,12 @@ let
|
||||
set packpath-=~/.vim/after
|
||||
set packpath+=${packDir packages}
|
||||
set packpath+=~/.vim/after
|
||||
|
||||
filetype indent plugin on | syn on
|
||||
'');
|
||||
|
||||
in writeText "vimrc" ''
|
||||
" minimal setup, generated by NIX
|
||||
" configuration generated by NIX
|
||||
set nocompatible
|
||||
|
||||
${vamImpl}
|
||||
@ -340,8 +346,6 @@ let
|
||||
${plugImpl}
|
||||
${nativeImpl}
|
||||
|
||||
filetype indent plugin on | syn on
|
||||
|
||||
${customRC}
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user