mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-17 17:31:18 +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
|
|
@ -59,10 +59,5 @@ in {
|
|||
With Trouble having so many different modes, and breaking changes
|
||||
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;
|
||||
in {
|
||||
options.vim = {
|
||||
leaderKey = mkOption {
|
||||
type = str;
|
||||
default = " ";
|
||||
description = "The leader key used for `<leader>` mappings";
|
||||
};
|
||||
|
||||
colourTerm = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
|
|
@ -191,6 +197,8 @@ in {
|
|||
vim.o.tm = ${toLuaObject cfg.mapTimeout}
|
||||
vim.o.cursorlineopt = ${toLuaObject cfg.cursorlineOpt}
|
||||
vim.o.scrolloff = ${toLuaObject cfg.scrollOffset}
|
||||
vim.g.mapleader = ${toLuaObject cfg.leaderKey}
|
||||
vim.g.maplocalleader = ${toLuaObject cfg.leaderKey}
|
||||
|
||||
${optionalString cfg.undoFile.enable ''
|
||||
vim.o.undofile = true
|
||||
|
|
|
|||
|
|
@ -101,10 +101,7 @@ in {
|
|||
|
||||
globals = mkOption {
|
||||
type = attrs;
|
||||
default = {
|
||||
mapleader = " ";
|
||||
maplocalleader = ",";
|
||||
};
|
||||
default = {};
|
||||
example = {"some_variable" = 42;};
|
||||
description = ''
|
||||
An attribute set containing global variable values
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue