mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 17:58:46 +02:00
update
This commit is contained in:
parent
c20896f0a4
commit
cc5c9ed8d0
3 changed files with 21 additions and 3 deletions
10
lua/custom/lsp_installer.lua
Normal file
10
lua/custom/lsp_installer.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
-- ini hanya untuk lsp yg tidak support masson
|
||||
-- untuk referesi support language kunjungi link dibawah
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
local m = {
|
||||
lspinstall = {
|
||||
"yamlls",
|
||||
-- tambahkan di bawah sini setelah melakukan :masoninstall
|
||||
},
|
||||
}
|
||||
return m
|
|
@ -1,6 +1,6 @@
|
|||
-- untuk referesi support language kunjungi link dibawah
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
local M = {
|
||||
local m = {
|
||||
lspreg = {
|
||||
"bashls",
|
||||
"yamlls",
|
||||
|
@ -11,7 +11,7 @@ local M = {
|
|||
"clangd",
|
||||
"dartls",
|
||||
"kotlin_language_server",
|
||||
-- tambahkan di bawah sini setelah melakukan :MasonInstall
|
||||
-- tambahkan di bawah sini setelah melakukan :masoninstall
|
||||
},
|
||||
}
|
||||
return M
|
||||
return m
|
||||
|
|
|
@ -9,6 +9,14 @@ local lspconfig = require("lspconfig")
|
|||
-- local servers = { "jdtls", "yamlls" }
|
||||
local servers = {}
|
||||
|
||||
local data_exists, custom_lsp = pcall(require, "custom.lsp_installer")
|
||||
if data_exists then
|
||||
for _, client in pairs(custom_lsp.lspinstall) do
|
||||
table.insert(servers, client)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
lsp_installer.setup({
|
||||
ensure_installed = servers,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue