mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-03-10 09:27:25 +00:00
fix(lspconfig): make opts a function (#3311)
`LazyVim.config` gets evaluated during the parsing phase with `opts` as a table (thus not taking into account changes made in the user's personal configuration for the icons), so make `opts` a function to defer the evaluation until the plugin loads.
This commit is contained in:
committed by
GitHub
parent
b3373f3428
commit
7aa37064a2
@@ -10,7 +10,8 @@ return {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
opts = function()
|
||||
return {
|
||||
-- options for vim.diagnostic.config()
|
||||
---@type vim.diagnostic.Opts
|
||||
diagnostics = {
|
||||
@@ -106,7 +107,8 @@ return {
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
---@param opts PluginLspOpts
|
||||
config = function(_, opts)
|
||||
if LazyVim.has("neoconf.nvim") then
|
||||
|
||||
Reference in New Issue
Block a user