Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Use multi-server to work with multi-workspace #45

Merged
merged 8 commits into from
Jul 23, 2020
Merged

Conversation

renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Jul 22, 2020

Close #44
Close REditorSupport/languageserver#272

This PR uses multi-server introduced at https://github.com/Microsoft/vscode-extension-samples/tree/master/lsp-multi-server-sample to handle the cases of zero, one, or multiple workspaces.

  • Untilted documents share a server started from home folder.
  • Each file outside workspaces uses a server started from parent folder.
  • Each workspace uses a server started from the workspace folder.

Since user would edit a single file at a time, the resource consumption looks perfectly acceptable.

For renv-enabled project, user has to install languageserver into the project library.

As for the use case of #34 where user wants languageserver installed in user library to work, r.lsp.args = [ "--no-init-file" ] should be used to skip the project profile.

Kapture 2020-07-23 at 9 58 54

@renkun-ken renkun-ken requested a review from randy3k July 22, 2020 23:04
@randy3k
Copy link
Member

randy3k commented Jul 22, 2020

👍

Copy link
Member

@randy3k randy3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I didn't test it though.

@renkun-ken
Copy link
Member Author

I test this under all mentioned settings and everything works well.

@renkun-ken renkun-ken merged commit c84f23d into master Jul 23, 2020
@renkun-ken
Copy link
Member Author

@randy3k May I publish a new release for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LSP doesn't see Renv (project-specific) library. multi workspaces
2 participants