Comments (8)
Not terribly related... but does anyone know how to keep which-key from spewing warnings every single startup?
from nixvim.
Not terribly related... but does anyone know how to keep which-key from spewing warnings every single startup?
I don't know of any native setting to do that, but you could downgrade which-key to a version prior to the breaking change:
{pkgs, ...}: {
programs = {
nixvim = {
plugins = {
which-key = {
enable = true;
package = pkgs.vimPlugins.which-key-nvim.overrideAttrs (oldAttrs: {
src = pkgs.fetchFromGitHub {
owner = oldAttrs.src.owner;
repo = oldAttrs.src.repo;
rev = "0539da005b98b02cf730c1d9da82b8e8edb1c2d2"; # v2.1.0
hash = "sha256-gc/WJJ1s4s+hh8Mx8MTDg8pGGNOXxgKqBMwudJtpO4Y=";
};
});
};
};
};
};
}
from nixvim.
Not terribly related... but does anyone know how to keep which-key from spewing warnings every single startup?
While looking through the source, I did see https://github.com/folke/which-key.nvim/blob/6c1584eb76b55629702716995cca4ae2798a9cca/lua/which-key/config.lua#L26 which makes it look like you can suppress the warnings about mappings with the notify = false option.
from nixvim.
Thanks for making an issue and for being so detailed - this is very useful!
I've been meaning to look into this for a few days now.
We could use our transitionType
to convert old values to the new type, but I think the best bet is to incorporate this as part of a general update/refactor of the module to use our new-style freeform settings
option.
from nixvim.
Looks like v3 comes with several other breaking changes to configuration options, so to me, it makes sense to just fully overhaul the module as well (in the spirit of which-key v3 being a complete rewrite)
from nixvim.
(sidenote: in to-lua.nix the comment says:
If this option is true, attrsets like { __unkeyed.1 = "a"; b = "b"; } will render as { "a", b = "b" }
but this is not correct. Here's what I see in nix-repl.
nix-repl> inputs.nixvim.lib.x86_64-linux.helpers.toLuaObject {__unkeyed.1 = "a"; b = "b";} error: syntax error, unexpected FLOAT, expecting '.' or '=' at «string»:1:62: 1| inputs.nixvim.lib.x86_64-linux.helpers.toLuaObject {__unkeyed.1 | ^ nix-repl> inputs.nixvim.lib.x86_64-linux.helpers.toLuaObject {__unkeyed1 = "a"; b = "b";} "{ \"a\", b = \"b\" }" nix-repl> inputs.nixvim.lib.x86_64-linux.helpers.toLuaObject {__unkeyed1 = "a"; __unkeyed2 = "b";} "{ \"a\", \"b\" }" nix-repl> inputs.nixvim.lib.x86_64-linux.helpers.toLuaObject {__unkeyed.a = "a"; b = "b";} "{ { a = \"a\" }, b = \"b\" }"
I skimmed over this the first time I read. The comment should use quoted attr names, but other than that is is "correct". E.g. this will work: { "__unkeyed.1" = "foo"; }
.
I can't recall if we normally use .
or -
separators elsewhere, but the toLua implementation just checks the key starts with __unkeyed
.
from nixvim.
Looking at the upstream docs: https://github.com/folke/which-key.nvim#%EF%B8%8F-mappings
The wording isn't concrete, but I get the impression the add()
method is now preferred over the spec
config option?
Either way I think the config option would still be a better fit for nixvim's module.
EDIT:
I also noticed other related issues still open. Some of these may be resolved already:
from nixvim.
Another work-around until we provide a propper solution is to remove your plugins.which-key.registrations
definition and instead call require('which-key').add
with the new format.
I've done this in my config: MattSturgeon/nix-config@e0cb861
EDIT: You can now use plugins.which-key.settings.spec
which I've updated my config to use here: MattSturgeon/nix-config@b1fcbde
from nixvim.
Related Issues (20)
- Better `package` option helpers HOT 1
- [BUG] The update CI schedules on forks
- [PLUGIN REQUEST] FeMaco
- [BUG] Alias @astrojs/language-server is still in node-packages.nix HOT 2
- [BUG] flaky codium test in cmp-sources
- [BUG] `disallowedRequisites` is used on a derivation that doesn't support it HOT 2
- [PLUGIN REQUEST] flutter-tools
- [BUG] Error with vscode-langservers-extracted dependent lsp servers HOT 3
- [BUG] Error when lsp html server is enabled HOT 1
- how to lazy: plugins with submodules
- [BUG] enabling some lsp servers fails to build because of `vscode-langservers-extracted` HOT 3
- [BUG] lightline is generating a wrong key name for component_function HOT 2
- [BUG] Conform plugin config using deprecated syntax for stop after first formatter HOT 4
- 'diagnostics' seemingly unavailable under programs.nixvim.* when used with home-manager HOT 2
- [PLUGIN REQUEST] helpview.nvim
- cmp `autoEnableSources` behaviour should be documented more prominently
- [PLUGIN REQUEST] Avante
- [PLUGIN REQUEST] ts-comments.nvim
- [PLUGIN REQUEST] sg.nvim (Cody)
- A flag to enable icon support in telescope
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixvim.