fix: better root finding for jdtls
This commit is contained in:
parent
5ffa0d858c
commit
ff4ddfda48
1 changed files with 2 additions and 1 deletions
|
@ -1,11 +1,12 @@
|
||||||
local nvim_jdtls = require("jdtls")
|
local nvim_jdtls = require("jdtls")
|
||||||
nvim_jdtls.start_or_attach({
|
nvim_jdtls.start_or_attach({
|
||||||
cmd = { 'jdtls' },
|
cmd = { 'jdtls' },
|
||||||
root_dir = vim.fs.dirname(vim.fs.find({'.gradlew', '.git', 'mvnw'}, {upward = true})[1]),
|
root_dir = require('jdtls.setup').find_root({'.git', 'mvnw', 'gradlew'}),
|
||||||
})
|
})
|
||||||
require('keybinds'):set_lsp_keys({buffer = 0})
|
require('keybinds'):set_lsp_keys({buffer = 0})
|
||||||
|
|
||||||
-- Allow decompiling classes coming from the language server too
|
-- Allow decompiling classes coming from the language server too
|
||||||
|
-- TODO should probably move elsewhere
|
||||||
vim.api.nvim_create_user_command(
|
vim.api.nvim_create_user_command(
|
||||||
'Javap',
|
'Javap',
|
||||||
function(args)
|
function(args)
|
||||||
|
|
Loading…
Reference in a new issue