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