copy from basic setup with mason install path

This commit is contained in:
Baipyrus 2024-07-28 22:06:51 +02:00
parent 45ad1e013b
commit a33a2ae8d8

View File

@ -199,6 +199,14 @@ return {
}, },
} }
local function jdtls_setup()
local config = {
cmd = { require('mason-registry').get_package('jdtls'):get_install_path() .. '/bin/jdtls' },
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]),
}
require('jdtls').start_or_attach(config)
end
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
-- To check the current status of installed tools and/or manually install -- To check the current status of installed tools and/or manually install
-- other tools, you can run -- other tools, you can run
@ -226,6 +234,7 @@ return {
handlers = { handlers = {
function(server_name) function(server_name)
if server_name == 'jdtls' then if server_name == 'jdtls' then
jdtls_setup()
return return
end end