mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 05:11:45 +00:00
copy from basic setup with mason install path
This commit is contained in:
parent
45ad1e013b
commit
a33a2ae8d8
@ -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
|
||||
-- To check the current status of installed tools and/or manually install
|
||||
-- other tools, you can run
|
||||
@ -226,6 +234,7 @@ return {
|
||||
handlers = {
|
||||
function(server_name)
|
||||
if server_name == 'jdtls' then
|
||||
jdtls_setup()
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user