mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 09:18:38 +02:00
plugins/misc: adapt to new maps options
This commit is contained in:
parent
574fb73258
commit
dd6a114e52
18 changed files with 262 additions and 193 deletions
|
@ -93,19 +93,19 @@ in
|
|||
// cfg.extraConfig
|
||||
);
|
||||
|
||||
maps.normal = mkMerge (
|
||||
keymaps = flatten (
|
||||
mapAttrsToList
|
||||
(
|
||||
name: value: let
|
||||
key = cfg.keymaps.${name};
|
||||
in
|
||||
if key == null
|
||||
then {}
|
||||
else {
|
||||
${key} = {
|
||||
action = ":JuliaCell${value.cmd}<CR>";
|
||||
inherit (cfg.keymaps) silent;
|
||||
};
|
||||
optional
|
||||
(key != null)
|
||||
{
|
||||
mode = "n";
|
||||
inherit key;
|
||||
action = ":JuliaCell${value.cmd}<CR>";
|
||||
options.silent = cfg.keymaps.silent;
|
||||
}
|
||||
)
|
||||
mappings
|
||||
|
|
|
@ -34,9 +34,20 @@ in {
|
|||
# Add the typst compiler to nixvim packages
|
||||
extraPackages = with pkgs; [typst];
|
||||
|
||||
maps.normal = with cfg.keymaps;
|
||||
helpers.mkModeMaps {inherit silent;} {
|
||||
${watch} = ":TypstWatch<CR>";
|
||||
};
|
||||
keymaps = with cfg.keymaps;
|
||||
helpers.mkKeymaps
|
||||
{
|
||||
mode = "n";
|
||||
options.silent = silent;
|
||||
}
|
||||
(
|
||||
optional
|
||||
(watch != null)
|
||||
{
|
||||
# mode = "n";
|
||||
key = watch;
|
||||
action = ":TypstWatch<CR>";
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue