mirror of
https://github.com/neovim/neovim.git
synced 2026-02-28 14:25:07 +00:00
`lsp.config[]` resolves an LSP config the first time it is called, and returns the cached result on subsequent calls. The change in #37571 added an extra call to `lsp.config[]` which will resolve the config *before* the server is added to `_enabled_configs`, meaning the result is discarded. That means configs will be needlessly resolved again once `lsp_enable_callback` fires for the first time. That includes an additional `loadfile()` call which is relatively expensive and can have unexpected side effects. Avoid this by storing the result of the initial call to `lsp.config[]` in `_enabled_configs` so the config is not resolved a second time once `lsp_enable_callback` is called for the first time.