jupyterlab-lsp
jupyterlab-lsp copied to clipboard
Improve the priority system
When adding pyright integration a simple priority system was implemented to allow testing multiple servers on CI. There are still things to do:
- [x] Release blocker: reduce number of tie messages, do not consider servers for use if not available (something is wrong on binder?)
- [ ] Make the settings reload connections if needed to reflect the priority changes - maybe just show message prompting for page reload for the closest release?
- [ ] Implement per-document type/path priority settings as originally proposed by @bollwyvl in https://github.com/jupyter-lsp/jupyterlab-lsp/issues/587#issuecomment-829343095:
yeah, a relatively quick band-aid that wouldn't require much spec rework would be to land it in user settings. Is this a place to start the idea of a regex-based approach for e.g. using different servers for notebooks and python files?
{ "language_servers": { "python-lsp-server": { "priority": 100, }, "pyright": { "priority": 1000, "serverSettings": { "python.analysis.useLibraryCodeForTypes": true }, "_path_overrides": { "priority": { "ipynb$": 0 } } } } }
In this case,
serverSettings
would not be overrideable by path (since we would still just have one language server process per implementation).This would give us a fair amount of flexibility until we figure out how to do multiple simultaneous sources properly, which is really the path forward...