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
When an explicit configuration is given for a server through setup(), availability check for that server is skipped, and it will be always setup when an associated filetype is triggered. The rationale behind this is that some server configurations in lspconfig dynamically changes cmd based on other fields or environment variables. It is hard to predict what the actual cmd is going to be. So I choose to skip the executable check in order to avoid false negatives of not picking up actually available servers.
Problem
False positives. After deploying my dotfiles on fresh Arch setup, opening nvim config immediately resulted in auto-lsp trying to setup lua_ls and failing, because I have explicit configs for lua_ls but didn't have it installed yet. It's only mildly annoying, but I'd still like to get rid of it.
Solution
some server configurations in lspconfig dynamically changes cmd based on other fields or environment variables.
Turns out there is a clear sign that tells this will happen or not. The on_new_config field is responsible for dynamic adjustments to the default config. I can take note if this field is present when iterating through configs during mappings generation. "Always setup if explicit user config is given" should be only applied to these servers.
The text was updated successfully, but these errors were encountered:
Current State
When an explicit configuration is given for a server through
setup()
, availability check for that server is skipped, and it will be always setup when an associated filetype is triggered. The rationale behind this is that some server configurations in lspconfig dynamically changescmd
based on other fields or environment variables. It is hard to predict what the actualcmd
is going to be. So I choose to skip the executable check in order to avoid false negatives of not picking up actually available servers.Problem
False positives. After deploying my dotfiles on fresh Arch setup, opening nvim config immediately resulted in auto-lsp trying to setup lua_ls and failing, because I have explicit configs for lua_ls but didn't have it installed yet. It's only mildly annoying, but I'd still like to get rid of it.
Solution
Turns out there is a clear sign that tells this will happen or not. The
on_new_config
field is responsible for dynamic adjustments to the default config. I can take note if this field is present when iterating through configs during mappings generation. "Always setup if explicit user config is given" should be only applied to these servers.The text was updated successfully, but these errors were encountered: