.config/nvim/lua/plugins/dap.lua

changeset 1186
ab57e995af63
parent 1165
840f0fde07e2
--- a/.config/nvim/lua/plugins/dap.lua
+++ b/.config/nvim/lua/plugins/dap.lua
@@ -65,5 +65,26 @@ return {
       { "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
       { "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
     },
+    config = function()
+      local dap = require("dap")
+
+      -- configs also made by nvim-dap-go, nvim-dap-ruby deps
+
+      dap.adapters.codelldb = {
+        type = "executable",
+        command = "codelldb",
+      }
+
+      dap.configurations.zig = {
+        {
+          name = "Launch",
+          type = "codelldb",
+          request = "launch",
+          program = "${workspaceFolder}/zig-out/bin/${workspaceFolderBasename}",
+          cwd = "${workspaceFolder}",
+          stopOnEntry = false,
+        },
+      }
+    end
   },
 }

mercurial