Skip to content

Commit 0b96a5b

Browse files
Added nvim-java
1 parent ce276f3 commit 0b96a5b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

init.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ require('lazy').setup({
381381
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
382382
'williamboman/mason-lspconfig.nvim',
383383
'WhoIsSethDaniel/mason-tool-installer.nvim',
384+
'nvim-java/nvim-java',
384385

385386
-- Useful status updates for LSP.
386387
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
@@ -532,6 +533,7 @@ require('lazy').setup({
532533
pyright = {},
533534
rust_analyzer = {},
534535
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
536+
cssls = {},
535537
ts_ls = {},
536538
slint_lsp = {
537539
-- command = 'slint-lsp',
@@ -579,6 +581,14 @@ require('lazy').setup({
579581
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
580582
require('lspconfig')[server_name].setup(server)
581583
end,
584+
-- For some reason jdtls has to be put here
585+
-- instead of being in the servers list above
586+
-- sample kickstart nvim config from the nvim-java developer
587+
-- https://github.com/nvim-java/starter-kickstart/blob/master/init.lua
588+
jdtls = function()
589+
require('java').setup {}
590+
require('lspconfig').jdtls.setup {}
591+
end,
582592
},
583593
}
584594
end,

0 commit comments

Comments
 (0)