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()
|
||||
require("user.dapui")
|
||||
local dap = require("dap")
|
||||
local util = require("jdtls.util")
|
||||
dap.adapters.java = function(callback)
|
||||
util.execute_command({ command = "vscode.java.startDebugSession" }, function(err0, port)
|
||||
if err0 ~= nil then
|
||||
return
|
||||
end
|
||||
callback({ type = "server", host = "127.0.0.1", port = port })
|
||||
end)
|
||||
end
|
||||
dap.configurations.java = {
|
||||
{
|
||||
type = "java",
|
||||
request = "launch",
|
||||
name = "Debug Java",
|
||||
program = "${file}",
|
||||
args = {},
|
||||
cwd = vim.fn.getcwd(),
|
||||
stopOnEntry = false,
|
||||
console = "integratedTerminal",
|
||||
internalConsoleOptions = "neverOpen",
|
||||
sourceMaps = true,
|
||||
outDir = "${workspaceFolder}/out",
|
||||
},
|
||||
}
|
||||
-- local dap = require("dap")
|
||||
-- local util = require("jdtls.util")
|
||||
-- dap.adapters.java = function(callback)
|
||||
-- util.execute_command({ command = "vscode.java.startDebugSession" }, function(err0, port)
|
||||
-- if err0 ~= nil then
|
||||
-- return
|
||||
-- end
|
||||
-- callback({ type = "server", host = "127.0.0.1", port = port })
|
||||
-- end)
|
||||
-- end
|
||||
-- dap.configurations.java = {
|
||||
-- {
|
||||
-- type = "java",
|
||||
-- request = "launch",
|
||||
-- name = "Debug Java",
|
||||
-- program = "${file}",
|
||||
-- args = {},
|
||||
-- cwd = vim.fn.getcwd(),
|
||||
-- stopOnEntry = false,
|
||||
-- console = "integratedTerminal",
|
||||
-- internalConsoleOptions = "neverOpen",
|
||||
-- sourceMaps = true,
|
||||
-- outDir = "${workspaceFolder}/out",
|
||||
-- },
|
||||
-- }
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>d", "", desc = " Debug" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue