mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-08 11:54:38 +02:00
Add files via upload
This commit is contained in:
commit
e53a643e3d
54 changed files with 5285 additions and 0 deletions
25
lua/user/lsp/config.lua
Normal file
25
lua/user/lsp/config.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- local servers = { "jsonls", "sumneko_lua","html","cssls","tsserver"}
|
||||
local servers = { "jdtls" }
|
||||
|
||||
lsp_installer.setup({
|
||||
ensure_installed = servers,
|
||||
})
|
||||
|
||||
for _, server in pairs(servers) do
|
||||
local opts = {
|
||||
on_attach = require("user.lsp.handlers").on_attach,
|
||||
capabilities = require("user.lsp.handlers").capabilities,
|
||||
}
|
||||
local has_custom_opts, server_custom_opts = pcall(require, "user.lsp.settings." .. server)
|
||||
if has_custom_opts then
|
||||
opts = vim.tbl_deep_extend("force", opts, server_custom_opts)
|
||||
end
|
||||
lspconfig[server].setup(opts)
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue