mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-17 01:21:02 +00:00
treewide: revert vim.leaderKey deprecation
This commit is contained in:
parent
29b7c415a9
commit
b230539598
4 changed files with 14 additions and 16 deletions
|
|
@ -81,15 +81,12 @@ favor of nixfmt (more information can be found
|
||||||
To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
||||||
`nixfmt`.
|
`nixfmt`.
|
||||||
|
|
||||||
### leader changes {#sec-leader-changes}
|
### Rust keymap changes {#sec-leader-changes}
|
||||||
|
|
||||||
This has been deprecated in favor of using the more generic `vim.globals` (you
|
Rust specific keymaps now use `maplocalleader` instead of `vim.leaderKey` by
|
||||||
can use `vim.globals.mapleader` to change this instead).
|
|
||||||
|
|
||||||
Rust specific keymaps now use `maplocalleader` instead of `localleader` by
|
|
||||||
default. This is to avoid conflicts with other modules. You can change
|
default. This is to avoid conflicts with other modules. You can change
|
||||||
`maplocalleader` with `vim.globals.maplocalleader`, but it's recommended to set
|
`maplocalleader` with `vim.globals.maplocalleader`, but it's recommended to set
|
||||||
it to something other than `mapleader` to avoid conflicts.
|
it to something other than `vim.leaderKey` to avoid conflicts.
|
||||||
|
|
||||||
## Changelog {#sec-release-0.7-changelog}
|
## Changelog {#sec-release-0.7-changelog}
|
||||||
|
|
||||||
|
|
@ -310,7 +307,8 @@ it to something other than `mapleader` to avoid conflicts.
|
||||||
- Telescope:
|
- Telescope:
|
||||||
- Fixed `project-nvim` command and keybinding
|
- Fixed `project-nvim` command and keybinding
|
||||||
- Added default ikeybind/command for `Telescope resume` (`<leader>fr`)
|
- Added default ikeybind/command for `Telescope resume` (`<leader>fr`)
|
||||||
- Add `hcl` lsp/formatter (not the same as `terraform`, which is not useful for e.g. `nomad` config files).
|
- Add `hcl` lsp/formatter (not the same as `terraform`, which is not useful for
|
||||||
|
e.g. `nomad` config files).
|
||||||
|
|
||||||
[Soliprem](https://github.com/Soliprem):
|
[Soliprem](https://github.com/Soliprem):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,5 @@ in {
|
||||||
With Trouble having so many different modes, and breaking changes
|
With Trouble having so many different modes, and breaking changes
|
||||||
upstream, it no longer makes sense, nor works, to toggle only Trouble.
|
upstream, it no longer makes sense, nor works, to toggle only Trouble.
|
||||||
'')
|
'')
|
||||||
# 2024-11-30
|
|
||||||
(mkRemovedOptionModule ["vim" "leaderKey"] ''
|
|
||||||
This has been deprecated in favor of using the more generic `vim.globals`
|
|
||||||
(you can use `vim.globals.mapleader` to change this instead).
|
|
||||||
'')
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,12 @@
|
||||||
cfg = config.vim;
|
cfg = config.vim;
|
||||||
in {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
|
leaderKey = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = " ";
|
||||||
|
description = "The leader key used for `<leader>` mappings";
|
||||||
|
};
|
||||||
|
|
||||||
colourTerm = mkOption {
|
colourTerm = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
@ -191,6 +197,8 @@ in {
|
||||||
vim.o.tm = ${toLuaObject cfg.mapTimeout}
|
vim.o.tm = ${toLuaObject cfg.mapTimeout}
|
||||||
vim.o.cursorlineopt = ${toLuaObject cfg.cursorlineOpt}
|
vim.o.cursorlineopt = ${toLuaObject cfg.cursorlineOpt}
|
||||||
vim.o.scrolloff = ${toLuaObject cfg.scrollOffset}
|
vim.o.scrolloff = ${toLuaObject cfg.scrollOffset}
|
||||||
|
vim.g.mapleader = ${toLuaObject cfg.leaderKey}
|
||||||
|
vim.g.maplocalleader = ${toLuaObject cfg.leaderKey}
|
||||||
|
|
||||||
${optionalString cfg.undoFile.enable ''
|
${optionalString cfg.undoFile.enable ''
|
||||||
vim.o.undofile = true
|
vim.o.undofile = true
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,7 @@ in {
|
||||||
|
|
||||||
globals = mkOption {
|
globals = mkOption {
|
||||||
type = attrs;
|
type = attrs;
|
||||||
default = {
|
default = {};
|
||||||
mapleader = " ";
|
|
||||||
maplocalleader = ",";
|
|
||||||
};
|
|
||||||
example = {"some_variable" = 42;};
|
example = {"some_variable" = 42;};
|
||||||
description = ''
|
description = ''
|
||||||
An attribute set containing global variable values
|
An attribute set containing global variable values
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue