Commit Graph

51 Commits

Author SHA1 Message Date
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
Symphorien Gibol
dddaa94ac2 neovim wrapper: also make <vimplugin>.pythonDepedencies a function
A function of the same signature as the argument of python.withPackages
2018-07-27 00:27:44 +02:00
Profpatsch
b90104ea0e lib/debug: fix use-sites of deprecated debug functions 2018-04-27 18:59:39 +02:00
Maximilian Bosch
8e70725077
vim_configurable: enable overrides
Sometimes it's needed to override parts of `vim_configurable`, for
instance when using ENSIME (http://ensime.github.io/), in this case you
need a Python interpreter and the modules `sexpdata` and
`websocket_client`.

However overriding `vim_configurable` is quite hard as we run
`vimUtils.makeCustomizable` over the default comming from
`configurable.nix`. Therefore it's necessary to copy the code from
`all-packages.nix` and alter the parts you need: https://nixos.org/nix-dev/2017-April/023364.html

In order to simplify overriding `vim_configurable` I added an
`override` and an `overrideAttrs` function to `vimutils.makeCustomizable`
to ensure that the customization capabilities won't be lost after
altering the derivation.

Now it's possible to write expressions like this without evaluation
failures:

```
with pkgs;

let
  vimPy3 = vim_configurable.override {
    python = python3;
  };
in vimPy3.customize { ... }
```
2018-02-07 16:57:40 +01:00
Maximilian Bosch
acf0ee69ba
vim-plugins: add overrideAttrs support for buildVimPluginFrom2Nix 2017-10-01 11:33:12 +02:00
Maximilian Bosch
5fb2184bd3
vim-plugins: add {pre,post}Install hooks to buildVimPlugin 2017-09-25 22:18:47 +02:00
Evan Danaher
c34aa75d30 vim-utils: Handle overriding knownPlugins betters. 2017-03-19 18:44:02 -04:00
Michael Raskin
846b6d250a Merge pull request #23256 from edanaher/ensime
Ensime
2017-03-18 18:24:19 +01:00
Daiderd Jordan
8977b1f2ee vim-plugins: use https for github repositories 2017-03-04 13:16:46 +01:00
Evan Danaher
dcab427908 vim-plugins: Add infrastructure for python[3]Dependencies.
This allows vim plugins to specify python dependencies required at
runtime, and they will be added to the python environment.
2017-02-27 12:36:03 -05:00
Nick Novitski
7bb0611e2e vim_configurable: Add packPath option to vimrcConfig (#22776)
* vim_configurable: Add packages option to vimrcConfig

Version 8 of vim adds the concept of "vim packages": directories which
contain one or more vim plugins, in either "start" or "opt"
subdirectories. Those in "start" are to be loaded automatically, while
those in "opt" can be loaded manually. Vim detects any packages located
in one of its "packpaths".

The packages option takes a set of sets describing one or more vim
packages, and adds the derivation containing these packages to the
packpath.

* fix documentation.
2017-02-22 01:06:34 +01:00
Jörg Thalheim
b7d65f8af0
vim.vam: fix filetype detection
According to https://github.com/MarcWeber/vim-addon-manager/blob/master/doc/vim-addon-manager-additional-documentation.txt#L1310
`filetype on` must be called after all VAM plugins are initialized.
Otherwise vim set `conf` filetype for some files containing hash tags.
2017-02-13 14:10:23 +01:00
Vladimír Čunát
49b136377a
Merge #16501: add a guide about vim plugins 2017-01-30 18:28:20 +01:00
Joe Hermaszewski
d6a3aaef89 vim-utils: fix typo 2016-11-13 12:07:10 +00:00
Rok Garbas
963327aacb vimPlugins: updating plugin and adding floobits plugin 2016-07-11 22:49:16 +02:00
Marc Weber
c3f56e912a Add nixpkgs documentation about how to create a derivation with Vim + plugins 2016-06-25 21:39:00 +02:00
Arseniy Seroka
4a0a0592db vimPlugins: move vim2nix into nixpkgs repo 2016-01-10 13:19:06 +03:00
Tuomas Tynkkynen
c47910ae4e nix-prefetch-scripts: Split into multiple derivations
This makes it possible to e.g. only install nix-prefetch-git and not the
others.

Closes #7399.
2015-12-04 14:38:41 +02:00
Benjamin Staffin
5fe9618a30 vimUtils.pluginnames2nix: fixes for non-nixos systems
Now referring to the nix prefetch scripts through their nixpkgs
derivation in order to make sure their shebang lines are rewritten
properly.  Otherwise nix-prefetch-hg fails on Ubuntu (and probably
Debian) systems, where /bin/sh is not bash.
2015-08-28 19:27:33 -07:00
Arseniy Seroka
9cd797ff26 vim plugins: refactor and regenerate 2015-06-01 23:40:29 +03:00
Arseniy Seroka
ec21d9d526 vimPlugins: update 2015-03-26 22:54:29 +03:00