mason-tool-installer.nvim
mason-tool-installer.nvim copied to clipboard
How to extends `ensure_installed` dynamically upon `BufReadPre`
I am trying to separate configuration for each language to its own file. I am using lazy.nvim for this. I can easily extends treesitter and lspconfig config as follows from terraform.lua file
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, {
"terraform",
"hcl",
})
end
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
terraformls = {},
},
},
},
}
I tried extending ensure_installed as same as treesitter shown above. But it did not work.
How to separate Language Server and its tool installation like above for this plugin? Also thanks a lot for making this plugin. it makes mason configuration really easy
I have the exact same use case and would love this feature to be added. Right now I have to do an ugly workaround