3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

71 commits

Author SHA1 Message Date
Matthias Beyer e74ca28bed vim-plugins: Fix name of attribute
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-01-11 10:19:56 +01:00
José Luis Lafuente 19b22191f7 vim-utils: better error message if duplicates
Print a more user friendly error message if you try to in install
multiple plugins with the same name
closes #145980 #146099
2021-11-16 19:26:59 +01:00
José Luis Lafuente 8605fbd737 vim-utils: create less symlinks
For every vim plugin, we create a symlink to every file in the top
directory. It should be enough to create a symlink to the vim plugin
directly.
2021-11-08 22:35:49 +01:00
Arthur Gautier 9cb5337fde
vim-utils: fix dependency graph (#140118)
* neovim.tests: ensure the graph is pulled

We'll change the plugin name to ensure the plugin is correctly pulled by
vim-plug config generation.
* neovim.tests: ensure nvim exit with error
* Revert "fix: remove trailing '/.' from vim-plug plugin paths"

The root cause if fixed by
761b2c6ff3 (diff-e4b94db9201d58bd9410739dddf92bef74e0b5f5e596c804a84ee7c580ae3f71R9)

This reverts commit d9d1a11aed.
2021-10-08 00:26:43 +02:00
Matthieu Coudron 320235ce21 vimUtils.packDir: expose packDir function
as it can be useful for some
2021-09-27 10:21:14 +02:00
hqurve 2b9f9efeec vimPlugins: use lib.getName instead of plugin.pname 2021-09-18 06:56:23 -04:00
anirudhb d9d1a11aed fix: remove trailing '/.' from vim-plug plugin paths
For some reason vim-plug doesn't seem to like that. This fixes it so
that it can properly load the plugins.
2021-09-18 12:41:45 +02:00
Matthieu Coudron 087e816e37 vimUtils: expose packDir 2021-09-17 00:33:03 +02:00
Matthieu Coudron 761b2c6ff3 neovim.tests: complete plug test
to check that it can correctly load the colorscheme
2021-09-17 00:33:03 +02:00
Matthieu Coudron 56f823dd5c vimPlugins: shorten rtpPath
nixpkgs creates a hierarchy of 3 folders share/runtime/<PKG_NAME> for no reason ?
makes debugging harder as well as paths longer when patching so this
removes this nested folders.
2021-09-12 00:14:14 +02:00
Matthieu Coudron 1fa84e3e02 vimPlugins: split doc generation into a hook
so that the hook can be used for lua modules as well. Improves
composition.
2021-09-04 00:12:35 +02:00
oxalica 039fc793c3
vim_configurable: handle python3Dependencies 2021-08-15 21:59:47 +08:00
Matthieu Coudron 06684792fb vimPlugins.plenary: init from lua package
This commit shows how to convert luarocks packages into (neo)vim ones.
The advantage for neovim lua plugins to register their rockspec (aka
package definition) is that the plugin can express its dependencies and
a few metadata through it.
2021-08-09 21:23:29 +02:00
Matthieu Coudron 1d1c6753c6 neovim: set packpath only if there are packages
part of the work to automatically disable the generation of init.vim when unnecessary
2021-06-07 23:36:03 +02:00
Tim Cuthbertson 3b4cace64d vim-utils: append customRC after plug / pathogen plugins are loaded 2021-06-06 16:25:11 +02:00
Matthieu Coudron 7836469dbe neovimUtils: makeNeovimConfig accepts plugins/customRc
mimics home-manager interface and makes it easier to associate configs with plugins. Added a test as well.
2021-05-25 22:41:08 +02:00
Matthieu Coudron abb1e5cd4c vimUtils: dont use the alias to vim-pathogen
it breaks vim builds when disallowing aliases
2021-05-25 22:41:07 +02:00
Matthieu Coudron b3abdc9534
tests.vim: init (moved from vim-utils.nix) (#119467)
* tests.vim: init (moved from vim-utils.nix)

Moved tests from pkgs/misc/vim-plugins/vim-utils.nix to pkgs/test/vim.
Also reduced the amount of generated config:
- Make it possible to have an empty config when configured adequately
- removed default vim config when using native packages, it could be
  source of bugs see linked issues (syntax on overrides vim highlights)

Things to watch out for:
- if you set configure.beforePlugins yourself, you will need to add set nocompatible too not to lose it
- filetype indent plugin on | syn on is not enabled anymore by default for the vim-plug installer: I dont think we should override vim defualts, at least not here since it is shared with neovim. Also sometimes it's enabled before plugins (pathogen etc,) which is not consistent.


you can run the tests via
$ nix-build -A tests.vim
2021-04-21 12:55:05 +02:00
Ben Siraphob badf51221d treewide: stdenv.lib -> lib 2021-01-16 17:58:11 +07:00
Matthieu Coudron 4c4c4874c4
neovim: add config to passthru (#101100)
first will register the config under the name init.vim which is more
appropriate for neovim.
Pass the generated config to passthru so that one can easily pass the
current config to a
raw/unwrapped neovim (helps with development).

For instance, home-manager can reference the config in $XDG_CONFIG_HOME/nvim/init.vim
without the need to wrap nvim with its config.
2020-10-20 12:26:39 +02:00
Isaac W Hanson be1594bf7a vim-utils: restore beforePlugins option
some plugins require configuration before their plugin definition
2020-05-06 14:18:44 -04:00
Timo Kaufmann 71331ee9ef
Merge pull request #74846 from rummik/vam-regression
Fix converting vam.pluginDictionaries to VimL
2020-03-19 21:39:01 +00:00
*Kim Zick (rummik) 6de54148ef vim-utils: Fix converting vam.pluginDictionaries to VimL 2020-03-19 17:22:52 -04:00
vasile luta 5d2ea07f02 vimUtils.vimrcFile: fixes packpath order 2020-01-23 20:53:07 +02:00
Wael M. Nasreddine 8dccb59bac 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)
2020-01-07 13:13:41 -08:00
Wael M. Nasreddine 5f0327a6e0 vim-plugins: remove unused and empty neobundleImpl 2020-01-07 13:13:41 -08:00
Wael M. Nasreddine e7faae24c0 vim-plugins: remove unused and empty vundleImpl 2020-01-07 13:13:41 -08:00
Wael M. Nasreddine 7909787a7d Revert "vimPlugins: turn filetype and syntax before sourcing the plugins (#66536)"
This reverts commit a3bf0c2e40.
2020-01-07 13:13:41 -08:00
volth 7b8fb5c06c treewide: remove redundant quotes 2019-09-08 23:38:31 +00:00
volth 08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
volth 35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Wael Nasreddine a3bf0c2e40
vimPlugins: turn filetype and syntax before sourcing the plugins (#66536)
Vim Terraform expects the `filetypedetect` group to exist. However, since we were enabling the filetype and the syntax *after* loading the plugins, it was exiting with an error preventing us from generating the remote plugins manifest with the plugin enabled. See #65894 for context.
2019-08-13 12:25:06 -07:00
Maximilian Bosch 12a7cc0d1f
Merge pull request #52685 from timokau/fzf-vim-dep
vimPlugins.fzf-vim: automatically add fzfWrapper
2019-08-11 17:16:36 +02:00
Jörg Thalheim dadc7eb329
treewide: use runtimeShell instead of stdenv.shell whenever possible
Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
2019-02-26 14:10:49 +00:00
Mateusz Gołębiewski 75211154ed vim: Allow independent setting of executable names
* Allow settign gvim wrapper name independently of vim wrapper name.
* Allow setting vim wrapper name independently of derivation name.
* Refactor multiple places where name was checked for null with default
  value.
2019-02-24 05:07:46 +01:00
Patrick Callahan b623da79e4 vim-utils: include vim man pages in the output of vim_customizable.customize 2019-02-24 04:31:00 +01:00
Timo Kaufmann 15bb6289d9 vimPlugins: fix vam dependency handling 2019-02-19 18:09:37 +01:00
Vladimír Čunát 3fe32b675e
Merge branch 'master' into staging 2019-01-22 15:59:42 +01:00
Timo Kaufmann ab22e8cc9c neovim: generate remote plugin manifest
This makes sure the user doesn't have to call `UpdateRemotePlugins`
manually for plugins installed through nix. A minor patch to neovim is
necessary, but it should be harmless. See
https://github.com/neovim/neovim/issues/9413 for a discussion about
the patch.
2019-01-18 21:18:32 +01:00
rnhmjoj bcf54ce5bb
treewide: use ${stdenv.shell} instead of /bin/sh where possible 2019-01-16 20:37:15 +01:00
Timo Kaufmann 801a548183 vimUtils: fix map parentheses 2019-01-02 22:59:19 +01:00
Timo Kaufmann f38363387e vimUtils: apply pluginToDrv recursively
This is necessary to handle plugin dependencies which also may be
strings.
2019-01-02 22:12:27 +01:00
Timo Kaufmann a0dc57e27b
vimUtils: derive pname from the plugin string (#53121)
For backwards compatibility. The user may specify their own plugins
without the pname attribute. In that case the attrname of the plugin
(given as a string) is the pname.

Fixes #53112
2018-12-31 16:26:06 +01:00
Timo Kaufmann 093cfde1e0 vimUtils: fix requiredPlugins
I broke this in #52767 and didn't notice because I only tested with vim
and `requiredPlugins` is only used by neovim. This would break setups
that use string-plugins (like pathogen) with neovim.
2018-12-31 10:31:14 +01:00
Timo Kaufmann 96b6396101 vimUtils.buildVimPlugin: derive name from pname and version 2018-12-27 10:34:14 +01:00
Timo Kaufmann 8e8a09bfc9 vimUtils: add dependency logic to nativeImpl
nativeImpl previously simply ignored dependency information.
2018-12-24 23:41:44 +01:00
Timo Kaufmann b352318cd1 vimUtils: represent vim plugins as derivations
Vim plugins were previously represented as strings by default,
necessitating a `knownPlugins` set. Backwards compatibility is kept
(strings are still accepted), so vam plugins should continue to work.
2018-12-24 23:41:41 +01:00
Thomas Kerber 3afe74864c
vim-utils: fix broken vim-plug implementation. 2018-09-20 14:41:12 +01:00
Jörg Thalheim bd46155a8d vimUtils: replace vim-addon-nix with vim-nix
vim-addon-nix throws weird errors on startup
2018-09-20 08:26:03 +01:00
Roman Volosatovs 516a83c0e8
vimPlugins: Add vim-plug addon implementation 2018-09-20 08:52:32 +02:00