mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-04 12:01:53 +00:00
git/gitsigns: switch to new null-ls sources API
This commit is contained in:
parent
5d2d249a46
commit
43b99474e6
1 changed files with 8 additions and 7 deletions
|
@ -5,6 +5,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.generators) mkLuaInline;
|
||||||
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;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
@ -32,6 +33,7 @@ in {
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end
|
end
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(mkSetExprBinding gsMappings.previousHunk ''
|
(mkSetExprBinding gsMappings.previousHunk ''
|
||||||
function()
|
function()
|
||||||
if vim.wo.diff then return ${toJSON gsMappings.previousHunk.value} end
|
if vim.wo.diff then return ${toJSON gsMappings.previousHunk.value} end
|
||||||
|
@ -77,13 +79,12 @@ in {
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf cfg.codeActions.enable {
|
(mkIf cfg.codeActions.enable {
|
||||||
vim.lsp.null-ls.enable = true;
|
vim.lsp.null-ls = {
|
||||||
vim.lsp.null-ls.sources.gitsigns-ca = ''
|
enable = true;
|
||||||
table.insert(
|
setupOpts.sources.gitsigns-ca = mkLuaInline ''
|
||||||
ls_sources,
|
require("null-ls").builtins.code_actions.gitsigns
|
||||||
null_ls.builtins.code_actions.gitsigns
|
'';
|
||||||
)
|
};
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue