nix-community.nixvim/plugins/by-name/quickmath/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

38 lines
827 B
Nix

{
lib,
...
}:
let
inherit (lib) types;
in
lib.nixvim.plugins.mkVimPlugin {
name = "quickmath";
packPathName = "quickmath.nvim";
package = "quickmath-nvim";
description = "A simple plugin to do live calculations in Neovim.";
maintainers = [ lib.maintainers.GaetanLepage ];
extraOptions = {
keymap = {
key = lib.nixvim.mkNullOrOption types.str "Keymap to run the `:Quickmath` command.";
silent = lib.mkOption {
type = types.bool;
description = "Whether the quickmath keymap should be silent.";
default = false;
};
};
};
extraConfig = cfg: {
keymaps =
with cfg.keymap;
lib.optional (key != null) {
mode = "n";
inherit key;
action = "<CMD>Quickmath<CR>";
options.silent = cfg.keymap.silent;
};
};
}