Skip to content

Remove the need for reloading VS Code when changing language servers

Kim-Adeline Miguel edited this page Apr 8, 2022 · 11 revisions

This is a design document for the refactoring needed in order to not require a reload when updating the python.languageServer setting (issue: 18509, PR: #18884).

Previous design

Language server-specific code was registered on extension activation depending on the value of the python.languageServer setting: If python.languageServer was set to Jedi, only the Jedi-specific classes would be available in the extension. This meant that updating the python.languageServer setting would trigger a prompt asking to reload, in order to register the classes needed by the new language server.

Language server checks (if the setting is set to its the default value, if the interpreter is Python 2.7) were also done on language server start during activation.

TODO: Jupyter support (cache)

Existing classes

Proposed design

TODO

  • Remove DI, allow stopping and starting LS on the fly

Note: As of today (April 2022) mermaid graphs aren't supported in wikis yet, please enjoy screenshots instead.

General architecture

Activation flow

Language server change flow

Clone this wiki locally