astronvim/lsp/setup_handlers.lua

18 lines
576 B
Lua
Raw Normal View History

2023-02-03 16:08:09 +01:00
return {
-- keys for a specific server name will be used for that LSP
--jdtls = function(server, opts)
-- -- custom sumneko_lua setup handler
-- require("lspconfig")["sumneko_lua"].setup(opts)
--end,
rust_analyzer = function(_, opts) require("rust-tools").setup { server = opts } end,
jdtls = function(_, opts)
vim.api.nvim_create_autocmd("Filetype", {
pattern = "java", -- autocmd to start jdtls
callback = function()
if opts.root_dir and opts.root_dir ~= "" then require("jdtls").start_or_attach(opts) end
end,
})
end,
}