Commit Graph

358 Commits

Author SHA1 Message Date
Matthieu Coudron
71210f0410 neovimUtils.makeNeovimConfig: expose packpathsDir
this way home-manager can link the packpathDir in
~/.local/share/nvim/site which makes package discovery work without
needing to `set packpath` (making the wrapper further useless).
2023-02-28 11:59:22 +01:00
figsoda
42d1d60a92
Merge pull request #206773 from SuperSandro2000/cleanup-unused-bindings
treewide: cleanup some unused bindings
2023-02-06 20:07:50 -05:00
Sandro Jäckel
50e0012f9d
treewide: cleanup some unused bindings 2023-02-07 01:36:15 +01:00
figsoda
3e656f7c1d
Merge pull request #212235 from raboof/neovim-0.8.2-to-0.8.3
neovim: 0.8.2 -> 0.8.3
2023-02-05 21:15:04 -05:00
Arnout Engelen
11b9314f14
neovim: 0.8.2 -> 0.8.3 2023-02-02 19:22:51 +01:00
Shawn8901
3866fa44a7 treewide: remove global with lib; in pkgs/{audio,blockchain,editors} 2023-01-21 23:11:12 +01:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Arnout Engelen
af0b453724
Merge pull request #208103 from raboof/neovim-reproducible
neovim: make the build reproducible
2023-01-05 13:17:38 +01:00
Arnout Engelen
90c4a2ebc3
neovim: make the build reproducible
This introduces a patch that improves binary reproducibility since changes in
ordering of the generated code indeed cause changes in the compiled code.

Additionally, since neovim embeds luajit-compiled bytecode into the nvim binary,
we are impacted by https://github.com/LuaJIT/LuaJIT/issues/626 . It is possible
to switch to lua 5.1, but that'd be a regression (luajit has much better
performance and some plugins depend on it, like for example Noice and Lazy).
Disabling `COMPILE_LUA` at build time would cause a runtime penalty each time
neovim starts. Instead, we run luagit with those security settings disabled for
the build-time code generation.

(Note to self: for a minimized testcase this seemed to help at
975ec13f5d5aefcac1dbb15fa867e660e07c93a1 but no longer at
03080b795aa3496ed62d4a0697c9f4767e7ca7e5 of luajit, which is surprising since
that commit doesn't look super relevant. _Also_ surprisingly it does seem to
work in the context of the neovim code generation, though, so that might be
good enough...)

Also, some of the code generation (using mpack and tables) still relies on
stable table ordering. This should eventually be fixed, but as a workaround
we use the luajit-with-stable-string-ids for those generators as well.

Fixes #207841
2023-01-01 15:50:12 +01:00
Gaetan Lepage
5d6f451722 neovim: 0.8.1 -> 0.8.2 2022-12-30 16:37:35 +01:00
Naïm Favier
4e5ebcc3ed
vim-full: rename from vim_configurable
Avoids confusion: `vim-full`'s build-time features are configurable, but both
`vim` and `vim-full` are *customizable* (in the sense of user configuration).
2022-12-09 09:55:55 +01:00
Sandro Jäckel
5108c96e98 neovim: remove global with lib 2022-12-08 00:08:04 +01:00
figsoda
eeb1fad1bc neovide: drop python2, clean up 2022-12-05 14:29:57 -05:00
Daniel Thwaites
d797db230d neovim: rename wrapper 2022-11-30 18:54:29 +01:00
Alexis Hildebrandt
6092075d23 neovim: 0.8.0 -> 0.8.1 2022-11-15 18:52:15 +01:00
Christian Kögler
f9c04d8557 neovide: 0.10.1 -> 0.10.3 2022-11-07 13:49:52 +01:00
github-actions[bot]
886633ba43
Merge master into staging-next 2022-10-15 00:04:00 +00:00
Matthieu Coudron
2acce7dfdc vimPlugins: make usage of luaPackages less confusing
right now the src is ignored in:

```
  lush-nvim = buildNeovimPlugin {
    pname = "lush.nvim";
    version = "2022-08-09";
    src = fetchFromGitHub {
      owner = "rktjmp";
      repo = "lush.nvim";
      rev = "6b9f399245de7bea8dac2c3bf91096ffdedfcbb7";
      sha256 = "0rb77rwmbm438bmbjfk5hwrrcn5sihsa1413bdpc27rw3rrn8v8z";
    };
    meta.homepage = "https://github.com/rktjmp/lush.nvim/";
  };
```

which is very confusing. With this PR, we correctly override the src and
the version of the package. We introduce a rockspecVersion attribute of
lua package to be able to still find the rockspec when the
"version" field needs to be different than "rockspecVersion".
2022-10-13 19:57:35 +02:00
Markus S. Wamser
c9d167f174 pkgs.applications: remove unused args 2022-10-12 16:00:16 +02:00
Christian Kögler
472f197978 neovide: remove dependency to skia sources 2022-10-08 21:39:01 +02:00
oxalica
f9af66562a neovim-remote: fix build with neovim 0.8 2022-10-04 10:59:08 +02:00
Jens Nolte
d9f5a82c8c neovim: 0.7.2 -> 0.8.0 2022-10-02 02:39:51 +02:00
Matthieu Coudron
aedd12c96a vimUtils.packdir: better merge of plugins
Fixes https://github.com/NixOS/nixpkgs/issues/193070

Basically it was hard to install both
nvim-treesitter.withPlugins (
          plugins: with plugins; [
            tree-sitter-c
            tree-sitter-lua
            tree-sitter-org-nvim
          ]
        ));
and nvim-treesitter

It also simplifies some nix code.
2022-09-29 16:38:14 +02:00
github-actions[bot]
6ded381b0e
Merge master into staging-next 2022-09-22 00:03:22 +00:00
Florian Warzecha
86c51f68bc
nixos/neovim: fix remote plugin manifest generation (#191852)
Stops using ex mode when running neovim for remote plugin manifest generation, since that leads to errors in more recent neovim versions with various plugins.
neovim commit that breaks this plugin generation: https://github.com/neovim/neovim/commit/64d147b
2022-09-21 23:56:19 +02:00
Vladimír Čunát
a5dfac88d5
Merge branch 'master' into staging-next
The java conflicts weren't trivial.  Hopefully OK.
2022-09-19 07:40:23 +02:00
Colin Heffernan
d309a0b9e9
neovimUtils: put optional plugins in incorrect folder
all plugins ended up in "start". Also adds a test
2022-09-18 23:19:11 +02:00
github-actions[bot]
4650511a9c
Merge master into staging-next 2022-09-17 00:02:34 +00:00
Alexander Polakov
0e74fea612 neovide: fix build on darwin 2022-09-17 01:12:00 +04:00
Artturi
8b739f24a3
Merge pull request #187934 from Artturin/luasplice1 2022-08-31 16:58:55 +03:00
Guillaume Girol
38e16b192a neovim: fix plugin loading order
fixes https://github.com/NixOS/nixpkgs/issues/188167
2022-08-26 21:17:31 +02:00
Artturin
ec35f6341b lua-packages: try splicing 2022-08-26 20:04:02 +03:00
Matthieu Coudron
e3c0484acd neovim: correctly concat single line configs
The changes introduced in https://github.com/NixOS/nixpkgs/pull/184364#discussion_r945772144
didn't concat correctly the plugin configs when they were a single
string see: https://github.com/nix-community/home-manager/pull/3147

This adds a test for it.
2022-08-20 21:12:18 +02:00
Christian Kögler
27e6c7477b neovide: 0.10.0 -> 0.10.1 2022-08-15 14:38:19 +02:00
Christian Kögler
19f152c2b0 neovide: 0.9.0 -> 0.10.0 2022-08-15 00:55:38 +02:00
Matthieu Coudron
cc0ff183c6 neovimUtils: remove the compatibility layer introduced in 2018
removed compatFun, we need to make the code clearer
2022-08-09 16:21:59 +02:00
Matthieu Coudron
b4d8662c4a neovimUtils.makeNeovimConfig: remove mention of python2
latest neovim stopped supporting python2. We have an ellipsis as input so this should not cause any further error
2022-08-09 16:21:59 +02:00
Matthieu Coudron
cda1f8ae46 neovim: pass packpath via the wrapper
Adding "packages" to the neovim distribution triggers the wrapping of
the derivation. This is because it tries to "set packpath/rtp" in the
init.vim.

If we set these arguments via --cmd instead we can avoid to create an
init.vim, which can be useful if we want to wrap an init.lua later on
(in home-manager for instance, we dont want to generate viml code).

Also removes the support for "configure" in makeNeovimConfig and
configure.plug / configure.vam packages in the compatibility layer
'legacyWrapper'.
2022-08-09 16:20:55 +02:00
Matthieu Coudron
0fb2e47b7f vimUtils: improve comments 2022-08-09 12:01:33 +02:00
Matthieu Coudron
5d38ae801a neovimUtils: merge host settings so that they use a single --cmd flag
vim is limited to 10 --cmd flags so using fewer is better
2022-08-09 12:01:32 +02:00
Matthieu Coudron
6717d144ec vimRcContent: now throws when using pathogen 2022-08-09 12:00:20 +02:00
06kellyjac
d33f4a26a1 Revert "neovim: pass the --clean flag to only use wrapped rc"
This reverts commit ce49cb7792.
2022-08-05 11:51:15 +01:00
06kellyjac
ce49cb7792 neovim: pass the --clean flag to only use wrapped rc 2022-07-26 11:07:44 +02:00
Tae Selene Sandoval Murgan
f88533ec37 neovim-remote: disable tests on Darwin
The only enabled test started to fail with write errors. Setting
HOME=$TMPDIR works, but then it fails the same way than the disabled
ones
2022-07-13 10:11:27 +02:00
Michael Adler
2a1a6e5357 neovim-qt: 0.2.16.1 -> 0.2.17 2022-07-04 13:33:43 +02:00
Kirill Radzikhovskyy
2de1b09bf0 neovide: fixup hash 2022-07-02 14:40:52 +02:00
Christian Kögler
dd3a47ef86 neovide: 0.8 -> 0.9 2022-07-01 18:32:25 +02:00
José Luis Lafuente
1316546506 neovim: 0.7.0 -> 0.7.2 2022-06-30 14:55:47 +02:00
Matthieu Coudron
ce505a3984
vimPlugins: use lua derivation if it exists (#178180)
Neovim plugins are now more often than not written in lua.
One advantage of the lua ecosystem over vim's is the existence of
luarocks and the rockspec format, which allows to specify a package
dependencies formally.
I would like more neovim plugins to have a formal description,
"rockspec" being the current candidate.
This MR allows to use nix lua packages as neovim plugins, so as to enjoy
every benefit that rockspecs bring:
- dependdency discovery
- ability to run test suite
- luarocks versioning
- rockspec metadata

the vim update.py script will check if an attribute with the vim plugin
pname exists in lua51Packages. If it does, it uses
buildNeovimPluginFrom2Nix on it, which modifies the luarocks config to
do an almost flat install (luarocks will install the package in the lua
folder instead of share/5.1/lua etc).
It also calls toVimPlugin on it to get all the vim plugin niceties.

The list of packages that could benefit from this is available at
https://luarocks.org/labels/neovim
but I hope it grows.
2022-06-19 14:18:16 +02:00
Maximilian Bosch
cdbc6e64e4
treewide: reduce maintenance workload for ma27
Note: I DO NOT resign from nixpkgs, not at all!

However, I like a clean notification inbox and I get a lot of stuff for
packages where I'm only an end-user or don't use them anymore and thus
can't help out that much.

So please consider it a measure to reduce the mental load for me when
going through my notifications ;-)
2022-06-19 12:07:43 +02:00
Matthieu Coudron
a1ad235743
vimUtils: deprecate configure.pathogen (#154814)
pathogen does not bring any value compared to vim native packages so
remove it to ease maintainance burden.
2022-06-13 15:25:46 +02:00
github-actions[bot]
107b6041bc
Merge master into staging-next 2022-05-22 18:01:20 +00:00
Tae Selene Sandoval Murgan
394687bf39 neovim-remote: 2.4.0 -> 2.5.1 2022-05-22 15:37:47 +02:00
github-actions[bot]
86ec85655d
Merge master into staging-next 2022-05-22 12:01:28 +00:00
Tae Selene Sandoval Murgan
f7e2353e0b neovim: Pass CoreServices when building on darwin 2022-05-22 09:16:22 +02:00
Naïm Favier
2ae69114a1
makeWrapper: implement --inherit-argv0
For symmetry/interoperability with makeBinaryWrapper. Implemented as
--argv0 '$0'
2022-05-10 22:07:57 +02:00
Theodore Ni
77c966e06e neovim-ruby: 0.8.1 -> 0.9.0 update some Neovim Ruby gem versions 2022-04-22 17:48:20 +02:00
Christian Kögler
2833064bcc
neovide: 2022-02-04 -> 0.8.0 (#168770)
* neovide: 2022-02-04 -> 0.8.0

* neovide: Remove unsupported platform darwin
2022-04-16 22:59:35 +02:00
Thiago Franco de Moraes
0e9bebed0c neovim: 0.6.0 -> 0.7.0 2022-04-16 10:39:52 +02:00
Matthieu Coudron
e98e3a2365
Merge pull request #166162 from teto/lua-checks-pr 2022-03-31 16:12:07 +02:00
Doron Behar
eb5409461a neovim: Explain more why tests are disabled 2022-03-30 12:08:06 +03:00
Doron Behar
f80b906b3a neovim: cleanup a bit libluv related hacks
Remove unneeded cmakeFlags and explain more what is the difference
between lua.pkgs.libluv and lua.pkgs.luv.
2022-03-29 22:16:24 +03:00
Sandro
761bee65a3
Merge pull request #166207 from SuperSandro2000/neovim-remote 2022-03-29 12:31:38 +02:00
Sandro Jäckel
1fff543a34
neovim: remove with lib over entire file 2022-03-29 10:45:23 +02:00
Matthieu Coudron
d3dcc106c8 neovim: revert the linker changes that cause issues on nix
some linker flags have been added to support declarative treesitter grammars but the justification is fuzzy and it breaks several stuff on nix see https://github.com/NixOS/nixpkgs/pull/147658
2022-03-29 04:31:47 +02:00
Malo Bourgon
fc3331b522
neovim-remote: add meta.mainProgram (#166173) 2022-03-29 04:15:31 +02:00
Christian Kögler
87631775cb neovide: 2021-10-09 -> 2022-02-04 2022-02-05 14:26:44 +01:00
Jonathan Ringer
91e5be0fc0 neovim: fix treesitter for darwin 2022-01-25 16:22:05 -08:00
Cody Hiar
abe84c21a9 neovim: add ldflag for treesitter plugins requiring libstdc++ 2022-01-24 15:33:23 -08:00
Ashish SHUKLA
9d6d1a474b neovim: 0.6.0 -> 0.6.1 2021-12-31 14:21:40 -08:00
Maximilian Bosch
a70b3d1847
neovim: prepend extraMakeWrapperArgs in wrapper with a space (#148409) 2021-12-03 16:37:52 +01:00
Michael Adler
137a153655
neovim: provide default value for python3Env (#147241) 2021-12-01 10:15:46 +01:00
Christian Kögler
fc48d182bc neovim: 0.5.1 -> 0.6.0 2021-12-01 10:11:17 +01:00
Christian Kögler
8b62b01325 neovim: Remove X11 dependency
Remove runtime dependency to X11 for smaller closure sizes
and reduced complexity.
2021-10-28 18:57:13 +02:00
Artturin
abe0a8608b neovide: support darwin 2021-10-21 20:51:36 +03:00
Artturin
24b7f415e6 neovide: only enable wayland on linux 2021-10-21 20:49:23 +03:00
Christian Kögler
454d9f7410 neovide: unstable-2021-08-08 -> unstable-2021-10-09 2021-10-10 13:56:07 +02: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
Gabriel Ebner
7005f1e6e2 neovim: 0.5.0 -> 0.5.1 2021-09-27 11:13:49 +02:00
Matthieu Coudron
cae999f7a3 neovim.tests: add a test for tags generation
packer.nvim has a doc/ folder so the vim doc hook should generate a 'tags' file
2021-09-17 16:00:00 +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
ed77db85ff
Merge pull request #136429 from teto/vim-remove-rtpPath
Vim remove share/runtime/NAME prefix from the installed folder
2021-09-12 19:58:17 +02:00
Matthieu Coudron
1c4904092b neovim.tests: test vim-plug too 2021-09-12 19:03:09 +02:00
Matthieu Coudron
88842910b5 lua: introduced a lua lib
Goal is to improve separation between packages and utilities.
Can help with autocompletion/navigate nixpkgs faster.
Also it will help standardize how LUA_PATH is exported across packages,
so that one can more easily make lua changes across nixpkgs (for
    instance changing where lua modules are installed).
2021-09-12 03:03:56 +02:00
Sandro Jäckel
7bf2ada396
neovim-ruby: 0.8.0 -> 0.8.1 2021-09-05 04:11:34 +02:00
Gregory Anders
d37ed0e5ad neovim: remove redundant -n in test
The -es flag already implies -n (no swapfile).
2021-09-01 12:21:43 -06:00
Gregory Anders
8477406018 neovim: allow extra Lua packages 2021-08-31 19:46:44 -06:00
ners
761c93e410
neovim-qt: add qtsvg depedency (#135683)
Co-authored-by: Christoph Neidahl <christoph.neidahl@gmail.com>
2021-08-26 00:59:47 +02:00
Matthieu Coudron
3ab8ce12c2 neovide: fix meta.mainProgram
it was trying to start neovide-unstable
2021-08-15 19:40:09 +02:00
Christian Kögler
be03a55b36 neovide: 2021-06-21 -> 2021-08-08 2021-08-11 01:17:00 +02:00
Christian Kögler
a517d00046 neovide: Remove expat
Expat is provided via skia.
2021-08-11 01:10:31 +02:00
Christian Kögler
6418b5d2d5 neovide: Fix #133409 by backporting freetype 2021-08-11 01:06:34 +02:00
Matthieu Coudron
51e3fe5346 neovim: set meta in the unwrapped version
instead of the wrapper: the wrapper will inherit the value from the unwrapped version. This allows nix run nixpkgs#neovim-unwrapped to work too.
2021-07-10 20:49:40 +02:00
Roman Volosatovs
58ba227160
neovim: 0.4.4 -> 0.5.0
`"-DUSE_BUNDLED=OFF"` is from 2bcf18deaa/contrib/flake.nix (L25)
2021-07-02 18:10:01 +02:00
Benjamin Tan
3f50543e34 neovide: enable wayland usage without xwayland 2021-06-27 23:22:18 -07:00
Christian Kögler
64d2892c92
neovide: 0b976c3 -> 4159c47f
* neovide: 0b976c3 -> 4159c47f

Neovide moved from Vulkan to OpenGL which has better GPU support.
2021-06-26 13:57:00 +02:00
Matthieu Coudron
83f6711464 neovim.tests: added more tests
to check for creation of vi/vim aliases.
These tests also now follow the coding conventions of having tests in
passthru.test .
2021-06-09 21:45:25 +02:00
Matthieu Coudron
4a2cbcfbb4 neovim: add some tests
To test the generated RC is included in the file and that we have the
option not to wrap the RC.

run:
nix-build -A tests.vim
2021-06-07 18:21:21 +02:00
Nicolas Berbiche
fbe60d186b
neovim: always generate rplugin.vim (#124990) 2021-05-31 00:05:51 +02:00
Matthieu Coudron
c73371e04b
neovim: fix neovim.override (#124785)
* neovim: temporary revert to unbreak user configs

Newly introduced "plugins" parameter is disabled until we get a better
testing infrastructure to minimize breaking changes.
2021-05-29 16:36:39 +02:00