neovim: add 'autoconfigure' setting#356271
Merged
teto merged 1 commit intoNixOS:masterfrom Nov 24, 2024
Merged
Conversation
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 NixOS#352741
This will make testing those plugins easier.
f9d59b9 to
0e67d16
Compare
Member
Author
|
disabled by default to let users test first for instance with |
mrcjkb
reviewed
Nov 23, 2024
| op = acc: normalizedPlugin: | ||
| acc ++ lib.optional (finalAttrs.autoconfigure && normalizedPlugin.plugin.passthru ? initLua) normalizedPlugin.plugin.passthru.initLua; | ||
| in | ||
| lib.foldl' op [] pluginsNormalized; |
Member
There was a problem hiding this comment.
question: foldl' will reverse the order (correct me if mistaken). Do we care about this?
Member
Author
There was a problem hiding this comment.
I dont think so, the accumulator comes first.
applying
diff --git a/pkgs/applications/editors/neovim/tests/default.nix b/pkgs/applications/editors/neovim/tests/default.nix
index fb89d47aceb0..48b00d42f272 100644
--- a/pkgs/applications/editors/neovim/tests/default.nix
+++ b/pkgs/applications/editors/neovim/tests/default.nix
@@ -170,7 +170,10 @@ in
'';
nvim_with_autoconfigure = pkgs.neovim.overrideAttrs(oa: {
- plugins = [ vimPlugins.unicode-vim ];
+ plugins = [
+ vimPlugins.unicode-vim
+ vimPlugins.fzf-hoogle-vim
+ ];
autoconfigure = true;
# legacy wrapper sets it to false
wrapRc = true;
generated
vim.cmd.source "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-init.vim"
vim.g.Unicode_data_directory="/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vimplugin-unicode.vim-2024-07-23/autoload/unicode"
vim.g.hoogle_fzf_cache_file = vim.fn.stdpath('cache')..'/hoogle_cache.json
mrcjkb
approved these changes
Nov 23, 2024
13 tasks
khaneliman
approved these changes
Nov 23, 2024
| /* neovim-drv must be a wrapped neovim | ||
| - exposes lua config in $luarcGeneric | ||
| - exposes vim config in $vimrcGeneric | ||
|
|
Member
Author
There was a problem hiding this comment.
I'll do this on next update ty
GaetanLepage
approved these changes
Nov 24, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
if true, the wrapper automatically appends those snippets when necessary
first setup in #352741
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.