You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, guys
I am a complete beginner with neovim., just set up my configuration. According to the mason-lspconfig documentation, when automatic_installation is enabled, it will automatically install the servers that are set up via lspconfig. Here is how I set up in my configuration
return {
"neovim/nvim-lspconfig",
event = "VimEnter",
dependencies = {
"williamboman/mason.nvim",
{
"williamboman/mason-lspconfig.nvim",
opts = { automatic_installation = true, },
},
"folke/neodev.nvim",
},
config = function()
...
local = servers = {
lua_ls = {...},
clangd = {...}.
}
local have_mason, mlsp = pcall(require, "mason-lspconfig")
...
if have_mason then
mlsp.setup({
handlers = {
function(server_name)
local server_opts = servers[server_name] or {}
server_opts.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server_opts.capabilities or {})
require("lspconfig")[server_name].setup(server_opts)
end,
},
})
end
end,
}
I thought mason-lspconfig would automatically detect the servers configured in lspconfig and then install them. However, it is not working. Did I do something wrong, or did I misunderstand its functionality?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, guys
I am a complete beginner with neovim., just set up my configuration. According to the mason-lspconfig documentation, when automatic_installation is enabled, it will automatically install the servers that are set up via lspconfig. Here is how I set up in my configuration
I thought mason-lspconfig would automatically detect the servers configured in lspconfig and then install them. However, it is not working. Did I do something wrong, or did I misunderstand its functionality?
Beta Was this translation helpful? Give feedback.
All reactions