mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-14 00:26:54 +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
|
|
@ -5,25 +5,25 @@
|
|||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.binds) mkBinding pushDownDefault;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.binds) mkKeymap pushDownDefault;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.utility.preview.glow;
|
||||
inherit (options.vim.utility.preview.glow) mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["glow-nvim"];
|
||||
config.vim = mkIf cfg.enable {
|
||||
startPlugins = ["glow-nvim"];
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
(mkBinding cfg.mappings.openPreview ":Glow<CR>" mappings.openPreview.description)
|
||||
keymaps = [
|
||||
(mkKeymap "n" cfg.mappings.openPreview ":Glow<CR>" {desc = mappings.openPreview.description;})
|
||||
];
|
||||
|
||||
vim.binds.whichKey.register = pushDownDefault {
|
||||
binds.whichKey.register = pushDownDefault {
|
||||
"<leader>pm" = "+Preview Markdown";
|
||||
};
|
||||
|
||||
vim.pluginRC.glow = entryAnywhere ''
|
||||
pluginRC.glow = entryAnywhere ''
|
||||
require('glow').setup({
|
||||
glow_path = "${pkgs.glow}/bin/glow"
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue