commentary: init plugin

This commit is contained in:
Pedro Alves 2021-02-10 15:17:21 +00:00
parent 2ca3c09635
commit 82158fba9c
3 changed files with 22 additions and 0 deletions

View file

@ -51,6 +51,7 @@
plugins.undotree.enable = true; plugins.undotree.enable = true;
plugins.gitgutter.enable = true; plugins.gitgutter.enable = true;
plugins.commentary.enable = true;
plugins.lsp = { plugins.lsp = {
enable = true; enable = true;

View file

@ -9,6 +9,7 @@
./git/gitgutter.nix ./git/gitgutter.nix
./utils/undotree.nix ./utils/undotree.nix
./utils/commentary.nix
./languages/treesitter.nix ./languages/treesitter.nix

View file

@ -0,0 +1,20 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.programs.nixvim.plugins.commentary;
in
{
# TODO Add support for aditional filetypes. This requires autocommands!
options = {
programs.nixvim.plugins.commentary = {
enable = mkEnableOption "Enable commentary";
};
};
config = mkIf cfg.enable {
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.vim-commentary ];
};
};
}