mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-19 10:21:18 +00:00
lsp/nvim-docs-view: add keybinds
This commit is contained in:
parent
111f6c10a1
commit
83802bb7db
2 changed files with 16 additions and 2 deletions
|
|
@ -3,10 +3,14 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
inherit (lib) mkIf nvim addDescriptionsToMappings mkSetBinding mkMerge;
|
||||
inherit (builtins) toString;
|
||||
|
||||
cfg = config.vim.lsp.nvim-docs-view;
|
||||
self = import ./nvim-docs-view.nix {inherit lib;};
|
||||
|
||||
mappingDefinitions = self.options.vim.lsp.nvim-docs-view.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
|
|
@ -21,6 +25,11 @@ in {
|
|||
update_mode = "${cfg.updateMode}",
|
||||
}
|
||||
'';
|
||||
|
||||
maps.normal = mkMerge [
|
||||
(mkSetBinding mappings.viewToggle "<cmd>DocsViewToggle<CR>")
|
||||
(mkSetBinding mappings.viewUpdate "<cmd>DocsViewUpdate<CR>")
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue