Wondering how I can run a different config for a package depending on which definition gets lazilly called first #1785
Unanswered
Kaisia-Estrel
asked this question in
Q&A
Replies: 1 comment
-
After finding out {
"neovim/nvim-lspconfig",
opts = {
setup = {
lua_ls = {}
}
}
}, { "neovim/nvim-lspconfig",
lazy = true,
config = function(_, opts)
local lspconfig = require("lspconfig")
for lsp, lsp_opts in pairs(opts.setup) do
trace(lsp)
lspconfig[lsp].setup(lsp_opts)
end
end
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
lua/user/plugins/lang/lua.lua
lua/user/plugins/lang/rust.lua
I'm trying to figure out how I can lazily load a plugin whilst having defined it multiple times i.e. here in lspconfig so that I can setup it uniquely between different languages. Right now, it just works via the imported plugin:
results in:


despite
:Lazy
showing it properly attributed to rust(
user.util.langplugins
is just a wrapper function to add extra fields to every plugin item rn btw)Beta Was this translation helpful? Give feedback.
All reactions