added java tls
This commit is contained in:
@@ -22,6 +22,7 @@ return {
|
||||
{ 'mason-org/mason.nvim', opts = {} },
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
'nvim-java/nvim-java',
|
||||
|
||||
-- Useful status updates for LSP.
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
@@ -208,10 +209,10 @@ return {
|
||||
-- - settings (table): Override the default settings passed when initializing the server.
|
||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
clangd = {},
|
||||
gopls = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||
@@ -220,7 +221,7 @@ return {
|
||||
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
||||
-- ts_ls = {},
|
||||
--
|
||||
|
||||
--
|
||||
lua_ls = {
|
||||
-- cmd = { ... },
|
||||
-- filetypes = { ... },
|
||||
@@ -237,6 +238,22 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
require('java').setup {
|
||||
-- Your custom jdtls settings goes here
|
||||
}
|
||||
|
||||
require('lspconfig').jdtls.setup {
|
||||
-- Your custom nvim-java configuration goes here
|
||||
}
|
||||
|
||||
-- The following loop will configure each server with the capabilities we defined above.
|
||||
-- This will ensure that all servers have the same base configuration, but also
|
||||
-- allow for server-specific overrides.
|
||||
for server_name, server_config in pairs(servers) do
|
||||
server_config.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server_config.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server_config)
|
||||
end
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
--
|
||||
-- To check the current status of installed tools and/or manually install
|
||||
|
||||
Reference in New Issue
Block a user