added java tls
This commit is contained in:
7
init.lua
7
init.lua
@@ -91,7 +91,12 @@ vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
vim.o.tabstop = 4 -- A TAB character looks like 4 spaces
|
||||
vim.o.expandtab = true -- Pressing the TAB key will insert spaces instead of a TAB character
|
||||
vim.o.softtabstop = 4 -- Number of spaces inserted instead of a TAB character
|
||||
vim.o.shiftwidth = 4 -- Number of spaces inserted when indenting
|
||||
|
||||
-- [[ Setting options ]]
|
||||
require 'options'
|
||||
|
||||
@@ -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 = {},
|
||||
},
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user