mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-09 18:59:48 +01:00
git/gitsigns: add setupOpts
module option for user-specified setup table
This commit is contained in:
parent
b7bea89d9a
commit
bf72ad90b0
2 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetExprBinding mkSetLuaBinding pushDownDefault;
|
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetExprBinding mkSetLuaBinding pushDownDefault;
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
cfg = config.vim.git.gitsigns;
|
cfg = config.vim.git.gitsigns;
|
||||||
|
|
||||||
|
@ -70,7 +71,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
pluginRC.gitsigns = entryAnywhere ''
|
pluginRC.gitsigns = entryAnywhere ''
|
||||||
require('gitsigns').setup{}
|
require('gitsigns').setup(${toLuaObject cfg.setupOpts})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
inherit (lib.modules) mkRenamedOptionModule;
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(mkRenamedOptionModule ["vim" "git" "gitsigns" "codeActions" "vim" "gitsigns" "codeActions"] ["vim" "git" "gitsigns" "codeActions" "enable"])
|
(mkRenamedOptionModule ["vim" "git" "gitsigns" "codeActions" "vim" "gitsigns" "codeActions"] ["vim" "git" "gitsigns" "codeActions" "enable"])
|
||||||
|
@ -13,6 +14,7 @@ in {
|
||||||
|
|
||||||
options.vim.git.gitsigns = {
|
options.vim.git.gitsigns = {
|
||||||
enable = mkEnableOption "gitsigns" // {default = config.vim.git.enable;};
|
enable = mkEnableOption "gitsigns" // {default = config.vim.git.enable;};
|
||||||
|
setupOpts = mkPluginSetupOption "gitsigns" {};
|
||||||
|
|
||||||
codeActions.enable = mkEnableOption "gitsigns codeactions through null-ls";
|
codeActions.enable = mkEnableOption "gitsigns codeactions through null-ls";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue