Commit Graph

29 Commits

Author SHA1 Message Date
Ben Siraphob
badf51221d treewide: stdenv.lib -> lib 2021-01-16 17:58:11 +07:00
Klemens Nanni
e0f258f596
neovim: Do $PATH lookup in neovim.desktop instead of hardcoding derivation
See db236e588d "steam: Do $PATH lookup in steam.desktop [...]".
tl;dr: Otherwise widget/panel/desktop icons in DEs like KDE break.

Simply stop adding the full derivation path for neovim and stick with
how upstream uses no path at all.

While here, take care of gnvim.desktop as well by adjusting the sed(1)
expression (and simplifying it in one go);  I do not use gnvim.desktop
but built it and confirmed the resulting files to contain no full paths
any longer.
2020-11-05 11:41:53 +01:00
Matthieu Coudron
42cc40ddc8 neovim: fix nodejs and ruby generation
These were not translated correctly in the new wrapper.
2020-11-02 23:27:49 +01:00
Matthieu Coudron
95702fe6d2 neovim: revert change to extraMakeWrapperArgs
wrapNeovim incited users to use a list instead of a string. Revert that:
the change is not super useful while breaking home-manager.
2020-10-31 14:32:02 +01:00
Matthieu Coudron
2eb1610725
neovimUtils: neovim utilities to handle more usecases
Current nixpkgs always wraps neovim with the "-u" which has sideeffects as explained in https://github.com/NixOS/nixpkgs/issues/55376 : 
1.  vim won't set the variable $MYVIMRC as explained #34215
 2. vim skips loading folder-specific .vimrc / .nvimrc

I wanted to provide a way for users to better control what flags are used to wrap neovim. This is achived by introducing wrapNeovimUnstable et neovimUtils, utilities to help with that. We provide a compatibility layer so that wrapNeovim still works and to let us experiment with wrapNeovimUnstable to better control neovim configuration, plugin dependencies, haskell environment etc so that it becomes easier to generate per-project neovim config.

With this commit, it's possible for instance for home-manager to wrap neovim without the `-u` and just write the config in the
expected $XDG_CONFIG_HOME/nvim/init.vim .
Expect wrapNeovimUnstable interface to evolve in the upcoming months.
2020-10-29 09:50:26 +01: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
Konstantin Alekseev
f9a5d8539d neovim: fix node neovim binary link 2020-08-12 13:59:02 -07:00
Doron Behar
c63b5c4c36 wrapNeovim: fix darwin build 2020-08-04 09:14:09 +03:00
Doron Behar
85f6da6eed wrapNeovim: Rewrite
Cleanups:
- Removed unneeded neovim.meta.description reset.
- Remove unnecessary -x checks in `postBuild`.
- Use a ${placeholder "out"} if needed.

Changes:
- Switch to symlinkJoin, so e.g manpages link to the environment (#87929).
- Use nvim-node from $out/bin/ just like all other providers.
- Compute all arguments to makeWrapper in pure Nix "before" `postBuild`.
- Prevent double wrapping in case `configure != {}` and rplugin.vim
  needs to be generated.

Co-authored-by: Silvan Mosberger <contact@infinisil.com>
2020-07-31 20:39:12 +03:00
Ersin Akinci
588ca6e310
neovim: use TMPDIR as home during initilizaiton 2020-03-15 12:55:06 +00: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
Shreyansh Khajanchi
3388941c59 neovim: fix icon not displaying 2019-10-17 11:34:40 +09: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
Jonas Holst Damtoft
dbb27af6c6 neovim: Allow passing extra makeWrapperArgs 2019-05-29 18:15:15 +09: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
Timo Kaufmann
51c4768f67 neovim: fix indentation 2019-01-18 21:15:17 +01:00
Alexey Shmalko
bc51418f1a
neovim-pygui: remove 2018-12-10 23:19:45 +02:00
Alexey Shmalko
4898e09215
pythonPackages.neovim-0.3.0 -> pythonPackages.pynvim-0.3.1 2018-12-09 01:15:41 +02:00
Wael M. Nasreddine
da4a004193
neovim wrapper: add withNodeJs to build wrapper with nodejs support 2018-11-14 19:54:47 -08:00
John Ericson
51907d257c stdenv, neovim: Use lib.warn for deprecation warnings 2018-09-05 11:40:29 -04: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
Symphorien Gibol
c1752666df neovim wrapper: use python.withPackages instead of python.buildEnv
They are both as powerful, but buildEnv is treacherous: if you pass a
package which depends on another python (for example the one of unstable
when you are on stable) it will be *silently* dropped, leading to hair
pulling.

Use case:
override neovim from unstable, but still keep stable's pythonPackages.
2018-07-24 15:05:50 +02:00
Symphorien Gibol
10436a707a neovim wrapper: do not unset PYTHONPATH
This solves the following bug:
opening neovim in nix-shell -p pythonPackages.numpy does not enable to
run successfully
:!python -c "import numpy"
because the PYTHONPATH is wiped by the neovim wrapper.

This wiping is necessary for the python providers, though, otherwise a
python2 nix-shell will make the python3 provider read python2 files.

We wrap the providers only, instead of neovim as whole.
2018-07-24 15:02:48 +02:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Matthew Bauer
02297beade treewide: add version to packages
Lots of packages are missing versions in their name. This adds them
where appropriate. These were found with this command:

 $ nix-env -qa -f. | grep -v '\-[0-9A-Za-z.-_+]*$' | grep -v '^hook$'

See issue #41007.
2018-05-25 15:48:05 -05:00
Gabriel Ebner
ba58b425f1 neovim: fix bundlerEnv 2018-02-22 21:18:04 +01:00
Matthieu Coudron
bec047eca3 neovim: remove confusing neovim parameter
The neovim package refers to itself, hopefully it is shadowed by a
function parameter but it is confusing, let's remove it.
2018-01-25 16:38:22 +09:00
Matthieu Coudron
266a65eaa9 neovim: don't install desktop file on darwin
nvim.desktop doesn't exist on darwin so forcefully reading it fails.
2018-01-16 17:41:31 +09:00
Matthieu Coudron
ab06f3e99c neovim: init wrapper
Adding a python package to the neovim environment should not trigger a recompilation.
This adds a wrapper to prevent that.
2018-01-15 23:24:20 +01:00