Add lsp settings to support disabling prompt and additional libPaths#1071
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem did you solve?
Closes #1037
Closes #1021
This PR adds the following
r.lspsettings:r.lsp.promptToInstallto prompt to installlanguageserverif the package is not installed.r.lsp.libPathsto add additional lib paths for the language server process to start with.The check before starting languageserver is removed. Instead, a single R process runs a script. It first checks if languageserver is installed and if so it starts the language server with proper arguments. This resolves #1021 so that the startup arguments won't be inconsistent between the R process to check the package and to run the language server.
r.lsp.libPathscould be useful if project package manager likerenvis used. In this case, user could add, for example, the following to the vscode settings to the workspace folder if renv is initialized in.vscodeand languageserver is installed here.{ "r.lsp.libPaths": [ "${workspaceFolder}/.vscode/renv/library/R-4.1/x86_64-apple-darwin17.0" ] }The path could be any location that contains a valid installation of languageserver so that the path is appended to
.libPaths()before the language server is run.(If you do not have screenshot) How can I check this pull request?