mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 02:41:33 +00:00
modules: make lib calls explicit where possible
This commit is contained in:
parent
bf1118eb28
commit
024e1a6845
41 changed files with 245 additions and 203 deletions
|
@ -1,5 +1,6 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkMappingOption;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
in {
|
||||
options.vim.comments.comment-nvim = {
|
||||
enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim";
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkMerge mkExprBinding mkBinding nvim;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.binds) mkExprBinding mkBinding;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.comments.comment-nvim;
|
||||
self = import ./comment-nvim.nix {
|
||||
inherit lib;
|
||||
};
|
||||
mappings = self.options.vim.comments.comment-nvim.mappings;
|
||||
self = import ./comment-nvim.nix {inherit lib;};
|
||||
inherit (self.options.vim.comments.comment-nvim) mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
|
@ -41,7 +41,7 @@ in {
|
|||
(mkBinding cfg.mappings.toggleSelectedBlock "<Plug>(comment_toggle_blockwise_visual)" mappings.toggleSelectedBlock.description)
|
||||
];
|
||||
|
||||
vim.luaConfigRC.comment-nvim = nvim.dag.entryAnywhere ''
|
||||
vim.luaConfigRC.comment-nvim = entryAnywhere ''
|
||||
require('Comment').setup({
|
||||
mappings = { basic = false, extra = false, },
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./comment-nvim.nix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./comment-nvim
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue