diff --git a/lua/barink/after/ftplugin/go.lua b/lua/barink/after/ftplugin/go.lua new file mode 100644 index 0000000..39d684f --- /dev/null +++ b/lua/barink/after/ftplugin/go.lua @@ -0,0 +1,36 @@ +local dap = require("dap") +print("You opened a Golang file") + +dap.adapters.delve = { + type = 'server', + port = '${port}', + executable = { + command = 'dlv', + args = {'dap', '-l', '127.0.0.1:${port}'}, + } +} + +-- https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md +dap.configurations.go = { + { + type = "delve", + name = "Debug", + request = "launch", + program = "${file}" + }, + { + type = "delve", + name = "Debug test", -- configuration for debugging test files + request = "launch", + mode = "test", + program = "${file}" + }, + -- works with go.mod packages and sub packages + { + type = "delve", + name = "Debug test (go.mod)", + request = "launch", + mode = "test", + program = "./${relativeFileDirname}" + } +} diff --git a/after/ftplugin/java.lua b/lua/barink/after/ftplugin/java.lua similarity index 100% rename from after/ftplugin/java.lua rename to lua/barink/after/ftplugin/java.lua diff --git a/lua/barink/after/ftplugin/lua.lua b/lua/barink/after/ftplugin/lua.lua new file mode 100644 index 0000000..fef868a --- /dev/null +++ b/lua/barink/after/ftplugin/lua.lua @@ -0,0 +1 @@ +print("You opened a LUA file..") diff --git a/after/plugin/colors.lua b/lua/barink/after/plugin/colors.lua similarity index 100% rename from after/plugin/colors.lua rename to lua/barink/after/plugin/colors.lua