This commit is contained in:
asep komarudin 2023-02-25 17:44:22 +07:00
parent cecc613d56
commit da02b7279c
2 changed files with 22 additions and 0 deletions

View file

@ -11,5 +11,8 @@ local m = {
"kotlin_language_server",
-- tambahkan di bawah sini setelah melakukan :masoninstall
},
skipreg = {
"jdtls", -- tambahkan di bawah ini
},
}
return m

View file

@ -8,6 +8,15 @@ local servers = {
"emmet_ls",
}
local function idxOf(array, value)
for i, v in ipairs(array) do
if v == value then
return i
end
end
return nil
end
local data_exists, custom_lsp = pcall(require, "custom.register_lsp")
if data_exists then
for _, client in pairs(custom_lsp.lspreg) do
@ -15,6 +24,16 @@ if data_exists then
end
end
local data_ok, unregis = pcall(require, "custom.register_lsp")
if data_ok then
if unregis.skip_reg ~= nil then
for _, unreg in pairs(custom_lsp.skip_reg) do
local my_index = idxOf(servers, unreg)
table.remove(servers, my_index)
end
end
end
local settings = {
ui = {
border = "none",