Replies: 3 comments
-
According to this answer, it looks like you could do something like this for lsp plugins:
Or more generically (this will work with non-lsp plugins):
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You can specify different installations for Windows and Linux like this: {
"mason-org/mason-lspconfig.nvim", -- Bridge between Mason and nvim-lspconfig
config = function()
local mason_lspconfig = require("mason-lspconfig")
-- Detect OS for platform-specific installations
local binaryformat = package.cpath:match("%p[\\|/]?%p(%a+)")
local Ensure_installed = {} -- Table to hold the list of servers to install
if binaryformat == "dll" then
-- Windows-specific packages to install
Ensure_installed = {
-- Language Servers
"lua_ls", -- Lua language server
"texlab", -- LaTeX language server
"pyright", -- Python language server (commented out)
-- Formatters
"ltex", -- LanguageTool for grammar checking
}
else
-- Unix-like systems (Linux/macOS)
Ensure_installed = {
"lua_ls", -- Lua language server
"pyright", -- Python language server (commented out)
}
end
binaryformat = nil -- Clean up variable after use
-- Configure which servers Mason should automatically install
mason_lspconfig.setup({
ensure_installed = Ensure_installed,
automatic_enable = false,
-- automatic_enable = {
-- "lua_ls",
-- },
})
end,
}, |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is what I ended up doing...in
And then in
|
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm new to mason (even to neovim in fact). I've configured my windows neovim with lazyvim and install some C# related packages through mason manually.
Now I want to reuse my neovim setting on a linux box. But I will need to go through the mason manual install for C# packages. is there any way to tell mason to install packages in the neovim configuration (like in init.lua for example) ? I did not find any clue about this
thanks for your answer
Beta Was this translation helpful? Give feedback.
All reactions