Allow disabling nvf mappings#1450
Conversation
7f2ed04 to
7823de1
Compare
781252c to
3a40efb
Compare
3a40efb to
0f14749
Compare
horriblename
left a comment
There was a problem hiding this comment.
Thanks! I wouldn't have thought of that
LGTM but I'd like an approval from @NotAShelf or @Soliprem
isn't raf on for vacation according to matrix? |
|
I'm on """vacation""", meaning I am away from my main system involuntarily |
LMFAO, :3 |
|
I added the changelog entry, seems like this won't need too many other changes :) |
cbddc5c to
0ba2482
Compare
0ba2482 to
c5c9ef8
Compare
|
Rebased on latest main (I'm rebasing to make sure to catch small incompatibilities as they get into the repo, given this touches a lot of files.) (Also means anyone testing this branch by using it gets up-to-date options elsewhere.) |
c5c9ef8 to
40f40a4
Compare
40f40a4 to
a62ed88
Compare
d48066a to
997c941
Compare
997c941 to
78a4db0
Compare
78a4db0 to
5f51010
Compare
Soliprem
left a comment
There was a problem hiding this comment.
on a skim nothing jumps to the eye that I'd change, and I like the change itslef. LGTM, but I'll need to review this better with a fresh mind
mkMappingOption wants to read a setting set in config without passing it every time, so it should be defined in config.
Generated using:
- `sd -F "inherit (lib.nvim.binds) mkMappingOption;" "inherit (config.vim.lib) mkMappingOption;" $(find . -type f)`
- `sd -F "{lib, ...}: let" "{config, lib, ...}: let" $(find . -type f)`
Tweaked manually (placement in inherit list, fixing todo-comments and toggleterm).
Ran `nix run nixpkgs#deadnix -- -e` to clean up.
Next commit includes unrelated dead code.
Mostly involves filtering keybinds that are null in cases where the keybind is the attrname, and optionalString for manual lua keybind registration.
5f51010 to
5ba3b72
Compare
This approach to the problem sources
mkMappingOptionfromconfig, since it should reference an option for whether to use the provided default ornull.This change would be completely transparent to any current users, but requires enforcing that new plugin contributions use
config.vim.lib.mkMappingOptioninstead of thelib.nvim.bindsversion.If people are using the original
mkMappingOptionin outside projects, it will continue working as before, which is probably the desired behaviour.mkMappingOptionwith ones to the config-aware one.mkMappingOptionfor options that should have used it but used to usemkOption.Related discussion: #1043
Feedback Wanted
mkMappingOptionbe named separately to reduce confusion?useNvfKeymapsbe named something else?Remaining work
surround-nvimvendored keymaps option default depend on the global setting?copilot-luamkLuaKeymapuselib.binds.mkLuaBinding?.#nixand.#maximalbuild withuseNvfKeymapsdisabled.Sanity Checking
This is probably worth testing a bit more thoroughly, if it gets accepted.
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.