jdtls for both windows/linux and add diagnostic keybind

This commit is contained in:
2025-04-16 22:57:29 +02:00
parent 6c9250d1da
commit c51e3b30e7
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1,6 +1,8 @@
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
local config = {
cmd = { os.getenv('HOME') .. '/.local/share/java/jdtls/bin/jdtls' },
cmd = { home .. '/.local/share/java/jdtls/bin/jdtls'},
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
}
require('jdtls').start_or_attach(config)
+2
View File
@@ -32,3 +32,5 @@ vim.g.c_syntax_for_h = 1
vim.cmd.colorscheme("moonfly")
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })