mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-13 16:25:04 +00:00
nvim-dap: impl adapters and configurations
This commit is contained in:
parent
1c98cf4079
commit
45f463574e
1 changed files with 19 additions and 1 deletions
|
|
@ -4,11 +4,13 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) concatStringsSep;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.attrsets) mapAttrs;
|
||||
inherit (lib.attrsets) mapAttrs mapAttrsToList;
|
||||
inherit (lib.nvim.binds) mkKeymap;
|
||||
inherit (lib.nvim.dag) entryAnywhere entryAfter;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.debugger.nvim-dap;
|
||||
opt = {
|
||||
|
|
@ -28,6 +30,22 @@ in {
|
|||
nvim-dap = entryAnywhere ''
|
||||
local dap = require("dap")
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "ErrorMsg", linehl = "", numhl = "" })
|
||||
|
||||
${
|
||||
concatStringsSep "\n"
|
||||
(mapAttrsToList (name: opts: ''
|
||||
dap.adapters[${toLuaObject name}] = ${toLuaObject opts}
|
||||
'')
|
||||
cfg.adapters)
|
||||
}
|
||||
|
||||
${
|
||||
concatStringsSep "\n"
|
||||
(mapAttrsToList (ft: opts: ''
|
||||
dap.configurations[${toLuaObject ft}] = ${toLuaObject opts}
|
||||
'')
|
||||
cfg.configurations)
|
||||
}
|
||||
'';
|
||||
}
|
||||
// mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue