neovim-flake/modules/comments/kommentary.nix
2023-04-02 19:16:04 +03:00

23 lines
402 B
Nix

{
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.comments.kommentary;
in {
options.vim.comments.kommentary = {
enable = mkEnableOption "kommentary";
};
config = mkIf cfg.enable {
vim.startPlugins = [
"kommentary"
];
vim.luaConfigRC.kommentary = nvim.dag.entryAnywhere ''
require('kommentary.config').use_extended_mappings()
'';
};
}