mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02: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:
parent
b3373f3428
commit
7aa37064a2
1 changed files with 93 additions and 91 deletions
|
@ -10,7 +10,8 @@ return {
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
},
|
},
|
||||||
---@class PluginLspOpts
|
---@class PluginLspOpts
|
||||||
opts = {
|
opts = function()
|
||||||
|
return {
|
||||||
-- options for vim.diagnostic.config()
|
-- options for vim.diagnostic.config()
|
||||||
---@type vim.diagnostic.Opts
|
---@type vim.diagnostic.Opts
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
@ -106,7 +107,8 @@ return {
|
||||||
-- Specify * to use this function as a fallback for any server
|
-- Specify * to use this function as a fallback for any server
|
||||||
-- ["*"] = function(server, opts) end,
|
-- ["*"] = function(server, opts) end,
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
|
end,
|
||||||
---@param opts PluginLspOpts
|
---@param opts PluginLspOpts
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
if LazyVim.has("neoconf.nvim") then
|
if LazyVim.has("neoconf.nvim") then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue