jdtls for both windows/linux and add diagnostic keybind
This commit is contained in:
+4
-2
@@ -1,6 +1,8 @@
|
|||||||
|
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
|
||||||
local config = {
|
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]),
|
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||||
}
|
}
|
||||||
|
|
||||||
require('jdtls').start_or_attach(config)
|
require('jdtls').start_or_attach(config)
|
||||||
|
|
||||||
|
|||||||
@@ -32,3 +32,5 @@ vim.g.c_syntax_for_h = 1
|
|||||||
|
|
||||||
vim.cmd.colorscheme("moonfly")
|
vim.cmd.colorscheme("moonfly")
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user