diff options
author | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2020-01-06 14:47:44 -0800 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-01-07 13:13:41 -0800 |
commit | 8dccb59bacef6ae1abc2725955aa3296c6160d2a (patch) | |
tree | d964dda04f10b8ddcd791fedca0d5d82b90e95ed /pkgs/misc | |
parent | 5f0327a6e04342d18db9681ed7fa7ff6fb960c7a (diff) | |
download | nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.tar nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.tar.gz nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.tar.bz2 nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.tar.lz nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.tar.xz nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.tar.zst nixpkgs-8dccb59bacef6ae1abc2725955aa3296c6160d2a.zip |
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]: https://github.com/MarcWeber/vim-addon-manager/tree/d9e865f3c2de5d9b7eabbc976f606cf1b89e29ea#recommended-setup [1]: https://github.com/tpope/vim-pathogen/blob/a553410f1bdb9000fbc764069f3a5ec3454a02bc/README.markdown#runtime-path-manipulation [2]: https://github.com/junegunn/vim-plug/blob/2f5f74e5e67f657e9fdac54891a76721bcd3ead3/README.md#usage
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 3b91a17e925..16c14b32218 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -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} ''; |