dap: appease the nix gods (fix statix lint)

This commit is contained in:
Ching Pei Yang 2024-10-09 17:52:32 +02:00
parent 3b7a11cb42
commit 20302afeca
No known key found for this signature in database
GPG key ID: 062FBBCE1D0C5DD9

View file

@ -16,9 +16,10 @@
in {
config = mkMerge [
(mkIf cfg.enable {
vim.startPlugins = ["nvim-dap"];
vim = {
startPlugins = ["nvim-dap"];
vim.pluginRC =
pluginRC =
{
# TODO customizable keymaps
nvim-dap = entryAnywhere ''
@ -28,7 +29,7 @@ in {
}
// mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources;
vim.maps.normal = mkMerge [
maps.normal = mkMerge [
(mkSetLuaBinding mappings.continue "require('dap').continue")
(mkSetLuaBinding mappings.restart "require('dap').restart")
(mkSetLuaBinding mappings.terminate "require('dap').terminate")
@ -47,11 +48,13 @@ in {
(mkSetLuaBinding mappings.goUp "require('dap').up")
(mkSetLuaBinding mappings.goDown "require('dap').down")
];
};
})
(mkIf (cfg.enable && cfg.ui.enable) {
vim.startPlugins = ["nvim-nio"];
vim = {
startPlugins = ["nvim-nio"];
vim.lazy.plugins = [
lazy.plugins = [
{
package = "nvim-dap-ui";
setupModule = "dapui";
@ -63,7 +66,7 @@ in {
}
];
vim.pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] (
pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] (
optionalString cfg.ui.autoStart ''
dap.listeners.after.event_initialized["dapui_config"] = function()
require("dapui").open()
@ -76,6 +79,7 @@ in {
end
''
);
};
})
];
}