feat: add comment.nvim and deprecate kommentary

This commit is contained in:
NotAShelf 2023-02-16 23:32:46 +03:00
commit 79587828f4
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
8 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,24 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.comments.comment-nvim;
in {
options.vim.comments.comment-nvim = {
enable = mkEnableOption "comment-nvim";
};
config = mkIf cfg.enable {
vim.startPlugins = [
"comment-nvim"
];
vim.luaConfigRC.comment-nvim = nvim.dag.entryAnywhere ''
require('Comment').setup()
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./comment-nvim.nix
./kommentary.nix
];
}

View file

@ -0,0 +1,24 @@
{
pkgs,
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()
'';
};
}