mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
feat: apply new module format to comment.nvim
This commit is contained in:
parent
ec1eaeca0d
commit
f9b44dd9cb
3 changed files with 20 additions and 4 deletions
14
modules/comments/comment-nvim/comment-nvim.nix
Normal file
14
modules/comments/comment-nvim/comment-nvim.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.comments.comment-nvim;
|
||||
in {
|
||||
options.vim.comments.comment-nvim = {
|
||||
enable = mkEnableOption "comment-nvim";
|
||||
};
|
||||
}
|
20
modules/comments/comment-nvim/config.nix
Normal file
20
modules/comments/comment-nvim/config.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.comments.comment-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"comment-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.comment-nvim = nvim.dag.entryAnywhere ''
|
||||
require('Comment').setup()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/comments/comment-nvim/default.nix
Normal file
6
modules/comments/comment-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./comment-nvim.nix
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue