mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-28 05:32:23 +00:00
init/basic: deprecate vim.leaderKey
in favour of `vim.globals.mapleader` and `vim.globals.maplocalleader` tmp Co-authored-by: raf <raf@notashelf.dev>
This commit is contained in:
parent
48a74623d8
commit
71de14149d
3 changed files with 9 additions and 9 deletions
|
@ -59,5 +59,10 @@ 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,12 +14,6 @@
|
||||||
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;
|
||||||
|
@ -197,8 +191,6 @@ 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,7 +101,10 @@ 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…
Reference in a new issue