mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 09:18:44 +02:00
migrate config form function to global variable
This commit is contained in:
parent
b6f0601d3d
commit
38d2c29a95
24 changed files with 248 additions and 245 deletions
|
@ -17,17 +17,17 @@ local function idxOf(array, value)
|
|||
return nil
|
||||
end
|
||||
|
||||
local data_exists, custom_lsp = pcall(require, "custom.register_lsp")
|
||||
local data_exists, custom_lsp = pcall(require, "core.config")
|
||||
if data_exists then
|
||||
for _, client in pairs(custom_lsp.lspreg) do
|
||||
for _, client in pairs(custom_lsp.register_lsp) do
|
||||
table.insert(servers, client)
|
||||
end
|
||||
end
|
||||
|
||||
local data_ok, unregis = pcall(require, "custom.register_lsp")
|
||||
local data_ok, unregis = pcall(require, "core.config")
|
||||
if data_ok then
|
||||
if unregis.skip_reg ~= nil then
|
||||
for _, unreg in pairs(custom_lsp.skip_reg) do
|
||||
if unregis.unregister_lsp ~= nil then
|
||||
for _, unreg in pairs(custom_lsp.unregister_lsp) do
|
||||
local my_index = idxOf(servers, unreg)
|
||||
table.remove(servers, my_index)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue