-
Notifications
You must be signed in to change notification settings - Fork 148
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
virtual_documents customization #416
Conversation
Good stuff! It's unreliable to use The hard-coded string Anyhow, we would probably need a test of this being configured and (ab)used by the front end... e.g. spaces, non-ASCII, etc. Errors in this part of the (st|h)ack are extremely hard for end users to reason about, as the errors end up coming from the language servers talk about a folder that they might not even know about... |
Thanks @bollwyvl for the review After a second look on the code and to take into account your remarks, do you think the following is a good idea: virtual_documents_uri = normalized_uri(pathlib.Path(contents.root_dir) / manager.virtual_documents_dir) |
Yes, normalized_uri would do the thing!
|
Sorry for the useless small commits at the end. |
Thank you! |
References
Fixes #353
Code changes
Move the ".virtual_documents" definition to a configuration in
LanguageServerManager
. Its default value is keptbut that default value can be overwritten by the environment variable
JP_LSP_VIRTUAL_DIR
User-facing changes
None - except if they must know about the virtual document folder.
Backwards-incompatible changes
None
Chores