mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(java): give java a default nvim-dap config (#4261)
## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> Currently, there are no Java configurations for nvim-dap upon enabling the Java extras. This requires debugging configurations to be setup manually afterwards. (This is unlike many other language extras which do have nvim-dap support "out of the box") This pr creates an initial configuration for nvim-dap which lets it attach to a debugging process on port 5005. (such as a spring boot application) More can be added if there are any experienced Java devs here. ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> None ## Screenshots <!-- Add screenshots of the changes if applicable. --> Error message:  Java remote debugging open:  ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
cdf3f1f2bd
commit
c9102bc351
1 changed files with 14 additions and 0 deletions
|
@ -40,6 +40,20 @@ return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
opts = function()
|
||||||
|
-- Simple configuration to attach to remote java debug process
|
||||||
|
-- Taken directly from https://github.com/mfussenegger/nvim-dap/wiki/Java
|
||||||
|
local dap = require("dap")
|
||||||
|
dap.configurations.java = {
|
||||||
|
{
|
||||||
|
type = "java",
|
||||||
|
request = "attach",
|
||||||
|
name = "Debug (Attach) - Remote",
|
||||||
|
hostName = "127.0.0.1",
|
||||||
|
port = 5005,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue