Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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

authored by

Wael M. Nasreddine and committed by
Jon
8dccb59b 5f0327a6

+7 -3
+7 -3
pkgs/misc/vim-plugins/vim-utils.nix
··· 208 '' 209 let &rtp.=(empty(&rtp)?"":',')."${vimPlugins.pathogen.rtp}" 210 execute pathogen#infect('${pluginsEnv}/{}') 211 ''); 212 213 /* vim-plug is an extremely popular vim plugin manager. ··· 259 260 in assert builtins.hasAttr "vim-addon-manager" knownPlugins; 261 '' 262 let g:nix_plugin_locations = {} 263 ${lib.concatMapStrings (plugin: '' 264 let g:nix_plugin_locations['${plugin.pname}'] = "${plugin.rtp}" ··· 329 set packpath-=~/.vim/after 330 set packpath+=${packDir packages} 331 set packpath+=~/.vim/after 332 ''); 333 334 in writeText "vimrc" '' 335 - " minimal setup, generated by NIX 336 set nocompatible 337 338 ${vamImpl} 339 ${pathogenImpl} 340 ${plugImpl} 341 ${nativeImpl} 342 - 343 - filetype indent plugin on | syn on 344 345 ${customRC} 346 '';
··· 208 '' 209 let &rtp.=(empty(&rtp)?"":',')."${vimPlugins.pathogen.rtp}" 210 execute pathogen#infect('${pluginsEnv}/{}') 211 + 212 + filetype indent plugin on | syn on 213 ''); 214 215 /* vim-plug is an extremely popular vim plugin manager. ··· 261 262 in assert builtins.hasAttr "vim-addon-manager" knownPlugins; 263 '' 264 + filetype indent plugin on | syn on 265 + 266 let g:nix_plugin_locations = {} 267 ${lib.concatMapStrings (plugin: '' 268 let g:nix_plugin_locations['${plugin.pname}'] = "${plugin.rtp}" ··· 333 set packpath-=~/.vim/after 334 set packpath+=${packDir packages} 335 set packpath+=~/.vim/after 336 + 337 + filetype indent plugin on | syn on 338 ''); 339 340 in writeText "vimrc" '' 341 + " configuration generated by NIX 342 set nocompatible 343 344 ${vamImpl} 345 ${pathogenImpl} 346 ${plugImpl} 347 ${nativeImpl} 348 349 ${customRC} 350 '';