Handle workspace/didChangeWatchedFiles#447
Merged
renkun-ken merged 5 commits intoREditorSupport:masterfrom Jul 6, 2021
Merged
Conversation
Member
Author
|
@randy3k Any comments? |
Member
|
LGTM. I think at some point we will need to look into supporting non-package projects, eg a shiny or plumber app. |
randy3k
approved these changes
Jul 6, 2021
randy3k
reviewed
Jul 6, 2021
| self$workspace$update_loaded_packages() | ||
| } else if (self$workspace$documents$has(uri)) { | ||
| doc <- self$workspace$documents$get(uri) | ||
| doc$did_close() |
Member
There was a problem hiding this comment.
To simplify the logic, could we move these line to line 103?
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.
Closes #446
This PR implements
workspace/didChangeWatchedFilesso that in a package workspace whenever files inRfolders are changed, the created or modified files will be reloaded, and the removed files are dropped. As a result, the workspace is always up-to-date.Note that the changes in open documents will trigger
workspace/didChangeWatchedFilestoo, but the client will send requests to properly handle them in the first place. Therefore, we explicitly ignore these open documents here.workspace/didChangeWatchedFiles