Commit Graph

417 Commits

Author SHA1 Message Date
Matthieu Coudron
d11140fa35
neovim: add 'autoconfigure' setting (#356271)
certain plugins need a custom configuration (available in passthru.initLua)
to work with nix. For instance unicode-vim needs to configure where to
find the data:
```
vim.g.Unicode_data_directory="${self.unicode-vim}/autoload/unicode"
```
if true, the wrapper automatically appends those snippets when necessary

first appearance of initLua in https://github.com/NixOS/nixpkgs/issues/352741

This will make testing those plugins easier.
2024-11-24 16:29:58 +01:00
birdee
7c2fe32578 neovim: fix ruby provider warning
Fixing this warning from checkhealth

provider.ruby: require("provider.ruby.health").check()

Ruby provider (optional) ~
- Ruby: ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
- Host: /nix/store/l354hgiahcjd81qazlc870104i26lm9b-neovim-0.10.2birdeevim/bin/birdeeVim-ruby
- OK Latest "neovim" gem is installed: /home/birdee/.local/share/gem/ruby/3.3.0/gems/neovim-0.10.0/lib/neovim/connection.rb:1: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
  You can add logger to your Gemfile or gemspec to silence this warning.
  0.10.0

steps taken:

added `gem 'logger'` to Gemfile

ran the following on the directory

nix run --no-write-lock-file github:BirdeeHub/neovim_ruby_updater
2024-11-21 05:14:20 -08:00
Austin Horstman
36be531246
neovimUtils.grammarToPlugin: improve error message on invalid grammarPlugins (#357062) 2024-11-19 11:09:05 -06:00
Gaétan Lepage
0acfb651f9
neovim-node-client: init at 5.3.0 (#317333) 2024-11-18 23:23:15 +01:00
birdee
600f8504be neovimUtils.grammarToPlugin: improve error message on invalid grammarPlugins
Update pkgs/applications/editors/neovim/utils.nix

Co-authored-by: Perchun Pak <github@perchun.it>

Update pkgs/applications/editors/neovim/utils.nix

Co-authored-by: Austin Horstman <khaneliman12@gmail.com>

Update pkgs/applications/editors/neovim/utils.nix

OH

Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
2024-11-18 12:25:39 -08:00
fidgetingbits
159c840101
neovim-node-client: init at 5.3.0 2024-11-17 15:59:43 +08:00
Matthieu C.
31dc3e56e0 neovim: add a checkPhase in the wrapper
add a checkPhase (if doCheck == true, disabled by default) that tries to
start neovim and fails in case of errors. It allows to catch small
misconfiugurations before switching to a new config.
2024-11-15 19:47:31 +01:00
Norbert Melzer
7f560e226f
neovimUtils: make installing queries in treesitter grammars optional (#344849) 2024-11-13 17:14:22 +01:00
Zhong Jianxin
09e2e58692
neovim: fix withRuby regression (#352045)
The wrapper refactor https://github.com/NixOS/nixpkgs/pull/344541
effectively make withRuby always enabled.

Fix https://github.com/NixOS/nixpkgs/issues/351839.
2024-10-29 12:52:36 +01:00
Matthieu Coudron
9bf032ab9d
neovim: fix withNodeJs regression (#350345)
neovim: fix regression about nodeJs / withRuby

in the last neovim refactor, there was a regression regarding
withNodeJs / withRuby handling, particulary not adding nodejs anymore to
the PATH
fix https://github.com/NixOS/nixpkgs/issues/349496
2024-10-22 21:52:44 +02:00
Birdee
50db3b6fbb
neovim.rubyEnv: 0.9.0 -> 0.10.0 (#332256) 2024-10-22 02:31:01 +02:00
Matthieu C.
2f4291af95 neovim: expose vimPackage
it is relatively cumbersome to generate the vim package from the list of plugins so expose it so users can generate their own packpathdirs for an unwrapped neovim. I've tested this change with an upcoming home-manager change that makes neovim configuration more standard in the home-manager context
2024-10-15 14:08:10 +02:00
Matthieu C.
d2d9d9f005 neovim.tests: add a test for passthru.initRc 2024-10-13 15:37:56 +02:00
Matthieu C.
12dafac23c neovim: make the wrapper more evolvable
Now that we have structured attributes enabled, it's easier than ever to
access the wrapper config from itself. Let's expose the 'plugins'
derivations instead of the final 'packpathDir' with which one can't do much.

TLDR: the neovim wrapper accepts a list of neovim derivations in
`plugins` instead of the symlinkJoin of plugins in `packpathDir`.

With exposed plugins, one could tweak the current wrapper with more
plugins, e.g. neovim.withPlugins([fugitive]).withPlugins([plenary]) .
we could also add a boolean to autoadd the plugins passthru.initLua,
better handle the dependencies (runtime programs, python deps).
2024-10-13 15:37:56 +02:00
PerchunPak
2668d660b6
neovimUtils: make installing queries in treesitter grammars optional 2024-10-03 11:11:57 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Matthieu Coudron
eae2c94383
fix neovim tests (#343769) 2024-09-23 09:56:20 +02:00
Matthieu C.
0fc790f4cc neovim.tests: minor improvements
- factorize the export HOME in runTest
- adjust suffix for nvim-with-luasnip (it was misleading)
- make 'checkAliases' check for executable bit as well
- expose nmt because it's more convenient to find its store path
2024-09-23 01:11:56 +02:00
Matthieu Coudron
423788f5b8
buildNeovimPlugin: pass a derivation to luaAttr (#343564)
* buildNeovimPlugin: pass a derivation to luaAttr
and deprecate passing a string.
Passing a string is not a typical/good nixpkgs habit. We want to give more control on
which attribute to wrap, without having to add it to the lua package set
necessarily.

* vimPlugins: update plugin with new syntax
buildNeovimPlugin now accepts derivations instead of the lua package name. This PR reflects the change
2024-09-22 20:01:56 +02:00
Matthieu C.
e9e4cd9391 neovim.tests.can_require_transitive_deps: fix running
it would hang without ever exiting neovim
2024-09-22 19:23:32 +02:00
Matthieu C.
1136ea8187 neovim.tests.nvim_with_ftplugin: fix the test
my previous "fix" broke the test, this restores it.
2024-09-22 19:15:42 +02:00
Peder Bergebakken Sundt
8c8c27bb19 treewide: remove unused inputs 2024-09-18 01:00:07 +02:00
Philip Taron
ae92f312bf
treewide: use a consistent meta.priority default 2024-08-29 09:04:57 -07:00
éclairevoyant
56a428d5fb
wrapNeovimUnstable: fix meta.position 2024-08-11 22:35:13 -04:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Gerg-L
d51dad7c77 neovim: stop inheriting meta.position from neovim-unwrapped 2024-07-22 15:01:34 +02:00
Aleksana
d582f13e5e
treewide: switch to cargoHash (#327127)
* nickel: switch to cargoHash

* gnvim-unwrapped: switch to cargoHash

* surrealdb-migrations: switch to cargoHash

* wluma: switch to cargoHash

* httm: switch to cargoHash

No need (observed) for these packages to have a vendor Cargo.lock. If they for some reason have to use a different Cargo.lock than upstream, they should copy that to the build directory as well, otherwise the build will fail. They don't, so I infer there's no reason to use Cargo.lock.
2024-07-15 22:55:51 +03:00
Martin Weinelt
9b79a05ae1
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/flexcache/default.nix
- pkgs/development/python-modules/flexparser/default.nix
- pkgs/development/python-modules/odp-amsterdam/default.nix
- pkgs/development/python-modules/pint/default.nix
- pkgs/development/python-modules/uncertainties/default.nix
- pkgs/top-level/python-packages.nix
2024-07-01 01:07:21 +02:00
Mango The Fourth
51e69413cf
neovimUtils.grammarToPlugin: also move the queries (#321550)
This installs queries from source into the neovim expected folder.

Some grammar queries are already in a folder like expected by neovim but others (notably the treesitter official ones) are not so the code deals with both. 
For instance the koka grammar puts its queries directly in "queries" folder https://github.com/mtoohey31/tree-sitter-koka/tree/main/queries
but some others puts it in a folder expected by neovim like https://github.com/tjdevries/tree-sitter-lua/tree/master/queries/lua .
2024-06-30 19:17:04 +02:00
Matthieu C.
443f4807e8 neovim-gtk: move to pkgs/by-name 2024-06-30 00:40:08 +02:00
Matthieu C.
e486522723 neovim-remote: move to pkgs/by-name 2024-06-30 00:35:05 +02:00
Martin Weinelt
f822b2ba5c Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/development/python-modules/langsmith/default.nix
- pkgs/development/python-modules/rich-pixels/default.nix
- pkgs/servers/teleport/generic.nix
2024-06-18 20:16:19 +02:00
Matthieu Coudron
9b23334289
neovim-qt: move to pkgs/by-name
* neovim-qt: move to pkgs/by-name
2024-06-18 10:40:23 +02:00
Matthieu C.
7e1ae5e8bb neovim: wrap LUA_PATH and LUA_CPATH
As described in https://github.com/NixOS/nixpkgs/issues/318925, lua
neovim plugin dependencies are not visible from neovim.

This calls the lua hook on the neovim packpack dir with the plugins.
The hook scans the propagated-build-input files (generated via
neovimUtils.packDir) and adds them to LUA_PATH / LUA_CPATH when
necessary.

We then wrap neovim with these values LUA_PATH prefixed with those
values
2024-06-12 15:26:44 +02:00
Matthieu C.
390ca00b5b neovimUtils.packDir: init: extend vimUtils.packDir
in order for neovim to catch plugins dependencies, we fork
vimUtils.packDir as `neovimUtils.packDir` to merge the various plugins
nix-support/propagated-build-inputs files in the packDir derivation
$out/nix-support/propagated-build-inputs where there was previously
none.

Having a fork allows us to experiment without impacting vim plugins.

Once we are more confident this doesn't break stuff and/or the
implementation is final, we can merge the fork back or replace one by
the other.
2024-06-12 15:07:06 +02:00
Matthieu C.
6fe1fd5421 neovim.tests: test lua transitive deps are available
As reported in several issues, lua plugin dependencies are not visible
from neovim. This adds a test to make sure nvim can see jsregexp when luasnip is part of the wrapper
see https://github.com/NixOS/nixpkgs/issues/306367 or https://github.com/NixOS/nixpkgs/issues/318925
for details
2024-06-12 14:11:31 +02:00
Matthieu C.
ceed006199 neovim: remove warning about --replace
by using --replace-warn
2024-06-11 00:06:06 +02:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
isabel
63aceac766 treewide: remove unused occurence of fetchFromGitHub argument 2024-05-30 05:56:07 +00:00
Matthieu C.
c2149a80d2 neovide: moved to pkgs/by-name 2024-05-04 15:25:23 +02:00
Matthieu C.
32d21ca630 neovim-unwrapped: move to pkgs/by name 2024-05-04 14:24:41 +02:00
PerchunPak
2b32fd65a3 neovimUtils.grammarToPlugin: remove vimplugin prefix
See https://github.com/NixOS/nixpkgs/pull/303200.
2024-05-01 14:35:38 +02:00
Elliot Cameron
be137fd0d0 neovim: propagate pname and version through wrapper 2024-04-22 10:46:27 +02:00
éclairevoyant
2f71bd6e73
Merge pull request #305340 from MultisampledNight/rm-multisn8-neovide
neovide: remove multisn8 from maintainers
2024-04-19 16:06:59 +00:00
MultisampledNight
02c9aec57a
neovide: remove multisn8 from maintainers
I don't feel comfortable anymore with updating and maintaining the neovide
package, or more to say being generally-trusted to do so.
2024-04-19 17:53:31 +02:00
Mario Rodas
28e51c9d10
Merge pull request #258705 from tie/fix-ca-derivations-disallowed
{ruby,neovim}: fix build with content-addressed derivations

Fixes https://github.com/NixOS/nixpkgs/issues/278334
2024-03-24 09:00:12 -05:00
Martin Weinelt
3321e63b12
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/sphinx-autobuild/default.nix
2024-03-19 04:00:32 +01:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
a-n-n-a-l-e-e
ce789e7e35
llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into libcxx (#292043)
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again

This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)

### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix  does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.

### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx

### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override

https://github.com/NixOS/nixpkgs/pull/292043
2024-03-11 03:53:37 -07:00
Gaétan Lepage
63e129f793
buildNeovimPlugin: set version accordingly to the manual guidelines (#289008)
https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-naming
2024-02-25 18:15:04 +01:00