mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-14 08:36:57 +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,15 +4,14 @@
|
|||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.binds) mkKeymap;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.lsp.nvim-docs-view;
|
||||
|
||||
mappingDefinitions = options.vim.lsp.nvim-docs-view.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
inherit (options.vim.lsp.nvim-docs-view) mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
|
|
@ -23,9 +22,9 @@ in {
|
|||
require("docs-view").setup ${toLuaObject cfg.setupOpts}
|
||||
'';
|
||||
|
||||
maps.normal = mkMerge [
|
||||
(mkSetBinding mappings.viewToggle "<cmd>DocsViewToggle<CR>")
|
||||
(mkSetBinding mappings.viewUpdate "<cmd>DocsViewUpdate<CR>")
|
||||
keymaps = [
|
||||
(mkKeymap "n" cfg.mappings.viewToggle "<cmd>DocsViewToggle<CR>" {desc = mappings.viewToggle.description;})
|
||||
(mkKeymap "n" cfg.mappings.viewUpdate "<cmd>DocsViewUpdate<CR>" {desc = mappings.viewUpdate.description;})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue