added java tls

This commit is contained in:
2025-09-12 15:02:47 +02:00
parent f2309053c7
commit d9807a35b5
5 changed files with 47 additions and 17 deletions

View File

@@ -1,9 +0,0 @@
return {
{ -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl`
main = 'ibl',
opts = {},
},
}

View File

@@ -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

View File

@@ -17,7 +17,7 @@ return {
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'tokyonight-day'
end,
},
}

View File

@@ -5,7 +5,24 @@ return {
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'rust',
'go',
'html',
'javascript',
'python',
},
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {