mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-29 06:18:18 +02:00
respect override table
This commit is contained in:
parent
72f5a54ec2
commit
0e05f05e9d
2 changed files with 18 additions and 0 deletions
|
@ -73,6 +73,15 @@ function M.setup(lang)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local overrides = lvim.lsp.override
|
||||||
|
|
||||||
|
if type(overrides) == "table" then
|
||||||
|
if u.has_value(overrides, lang) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
lspconfig[lsp.provider].setup(lsp.setup)
|
lspconfig[lsp.provider].setup(lsp.setup)
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,6 +42,15 @@ local function r_inspect_settings(structure, limit, separator)
|
||||||
return limit - 1
|
return limit - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function utils.has_value(tab, val)
|
||||||
|
for _, value in ipairs(tab) do
|
||||||
|
if value == val then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function utils.generate_settings()
|
function utils.generate_settings()
|
||||||
-- Opens a file in append mode
|
-- Opens a file in append mode
|
||||||
local file = io.open("lv-settings.lua", "w")
|
local file = io.open("lv-settings.lua", "w")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue