mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-13 16:25:04 +00:00
treewide: migrate to vim.keymaps
This commit is contained in:
parent
caef79e398
commit
55a96f83b4
13 changed files with 218 additions and 162 deletions
|
|
@ -4,8 +4,9 @@
|
|||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkMerge mkIf;
|
||||
inherit (lib.nvim.binds) mkBinding;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.lists) optional;
|
||||
inherit (lib.nvim.binds) mkKeymap;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.todo-comments;
|
||||
|
|
@ -17,11 +18,18 @@ in {
|
|||
"todo-comments-nvim"
|
||||
];
|
||||
|
||||
maps.normal = mkMerge [
|
||||
(mkBinding cfg.mappings.quickFix ":TodoQuickFix<CR>" mappings.quickFix.description)
|
||||
(mkIf config.vim.telescope.enable (mkBinding cfg.mappings.telescope ":TodoTelescope<CR>" mappings.telescope.description))
|
||||
(mkIf config.vim.lsp.trouble.enable (mkBinding cfg.mappings.trouble ":TodoTrouble<CR>" mappings.trouble.description))
|
||||
];
|
||||
keymaps =
|
||||
[
|
||||
(mkKeymap "n" cfg.mappings.quickFix ":TodoQuickFix<CR>" {desc = mappings.quickFix.description;})
|
||||
]
|
||||
++ (
|
||||
optional config.vim.telescope.enable
|
||||
(mkKeymap "n" cfg.mappings.telescope ":TodoTelescope<CR>" {desc = mappings.telescope.description;})
|
||||
)
|
||||
++ (
|
||||
optional config.vim.lsp.trouble.enable
|
||||
(mkKeymap "n" cfg.mappings.trouble ":TodoTrouble<CR>" {desc = mappings.trouble.description;})
|
||||
);
|
||||
|
||||
pluginRC.todo-comments = ''
|
||||
require('todo-comments').setup(${toLuaObject cfg.setupOpts})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue