mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
fix: java dap
This commit is contained in:
parent
cecf29d7db
commit
ddfa140e41
1 changed files with 25 additions and 25 deletions
|
@ -58,31 +58,31 @@ if pcode.active_java_config.active then
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("user.dapui")
|
require("user.dapui")
|
||||||
local dap = require("dap")
|
-- local dap = require("dap")
|
||||||
local util = require("jdtls.util")
|
-- local util = require("jdtls.util")
|
||||||
dap.adapters.java = function(callback)
|
-- dap.adapters.java = function(callback)
|
||||||
util.execute_command({ command = "vscode.java.startDebugSession" }, function(err0, port)
|
-- util.execute_command({ command = "vscode.java.startDebugSession" }, function(err0, port)
|
||||||
if err0 ~= nil then
|
-- if err0 ~= nil then
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
callback({ type = "server", host = "127.0.0.1", port = port })
|
-- callback({ type = "server", host = "127.0.0.1", port = port })
|
||||||
end)
|
-- end)
|
||||||
end
|
-- end
|
||||||
dap.configurations.java = {
|
-- dap.configurations.java = {
|
||||||
{
|
-- {
|
||||||
type = "java",
|
-- type = "java",
|
||||||
request = "launch",
|
-- request = "launch",
|
||||||
name = "Debug Java",
|
-- name = "Debug Java",
|
||||||
program = "${file}",
|
-- program = "${file}",
|
||||||
args = {},
|
-- args = {},
|
||||||
cwd = vim.fn.getcwd(),
|
-- cwd = vim.fn.getcwd(),
|
||||||
stopOnEntry = false,
|
-- stopOnEntry = false,
|
||||||
console = "integratedTerminal",
|
-- console = "integratedTerminal",
|
||||||
internalConsoleOptions = "neverOpen",
|
-- internalConsoleOptions = "neverOpen",
|
||||||
sourceMaps = true,
|
-- sourceMaps = true,
|
||||||
outDir = "${workspaceFolder}/out",
|
-- outDir = "${workspaceFolder}/out",
|
||||||
},
|
-- },
|
||||||
}
|
-- }
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>d", "", desc = " Debug" },
|
{ "<leader>d", "", desc = " Debug" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue