mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-08 03:37:15 +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
|
|
@ -3,12 +3,14 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkMerge mkIf mapAttrs nvim mkSetLuaBinding optionalString;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.attrsets) mapAttrs;
|
||||
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetLuaBinding;
|
||||
inherit (lib.nvim.dag) entryAnywhere entryAfter;
|
||||
|
||||
cfg = config.vim.debugger.nvim-dap;
|
||||
self = import ./nvim-dap.nix {
|
||||
inherit lib;
|
||||
};
|
||||
self = import ./nvim-dap.nix {inherit lib;};
|
||||
mappingDefinitions = self.options.vim.debugger.nvim-dap.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
|
|
@ -19,12 +21,12 @@ in {
|
|||
vim.luaConfigRC =
|
||||
{
|
||||
# TODO customizable keymaps
|
||||
nvim-dap = nvim.dag.entryAnywhere ''
|
||||
nvim-dap = entryAnywhere ''
|
||||
local dap = require("dap")
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "ErrorMsg", linehl = "", numhl = "" })
|
||||
'';
|
||||
}
|
||||
// mapAttrs (_: v: (nvim.dag.entryAfter ["nvim-dap"] v)) cfg.sources;
|
||||
// mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources;
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
(mkSetLuaBinding mappings.continue "require('dap').continue")
|
||||
|
|
@ -49,7 +51,7 @@ in {
|
|||
(mkIf (cfg.enable && cfg.ui.enable) {
|
||||
vim.startPlugins = ["nvim-dap-ui"];
|
||||
|
||||
vim.luaConfigRC.nvim-dap-ui = nvim.dag.entryAfter ["nvim-dap"] (''
|
||||
vim.luaConfigRC.nvim-dap-ui = entryAfter ["nvim-dap"] (''
|
||||
local dapui = require("dapui")
|
||||
dapui.setup()
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue