Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless autoinstall #456

Open
Susensio opened this issue Aug 29, 2024 · 0 comments
Open

Headless autoinstall #456

Susensio opened this issue Aug 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Susensio
Copy link

Susensio commented Aug 29, 2024

Is your feature request related to a problem? Please describe.

mason-lspconfig includes a automatic_installation setting. This is great, because it allows a single source of truth.
It works flawlessly when entering nvim on a fresh installation, but it does nothing when performing a headless bootstrap.

local function should_auto_install(server_name)
if platform.is_headless then
return false
end
local settings = require "mason-lspconfig.settings"
if settings.current.automatic_installation == true then
return true
end
if type(settings.current.automatic_installation) == "table" then
return not memoized_set(settings.current.automatic_installation.exclude)[server_name]
end
return false
end

Describe the solution you'd like

I would be nice if headless mode triggered a sync automatic installation

Describe potential alternatives you've considered

Deleting these lines would solve the issue, bc mason already takes care of headless sync installation

if platform.is_headless then
return false
end

I don't know if there is any other side effect of removing this safeguard.

@Susensio Susensio added the enhancement New feature or request label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant