Draft
Conversation
Member
|
Thank you! I know that it's still a draft, and bugs are expected... I tried to replace if (length(res) == 0 || (length(res) == 1 && res == "")) {
res <- ""
} else {
if (is.null(pkg)) {
info <- pkgname
if (!is.na(funcmeth)) {
if (info != "") {
info <- paste0(info, ", ")
}
info <- paste0(info, "function:", funcmeth, "()")
}
# TODO: Add the method name to the completion menu if (info != "")
}
}With the cursor over the first occurrence of |
Collaborator
Author
|
Thank you very much for sharing your experience. So here, all 6 instances should be renamed?d |
Collaborator
Author
Add support for renaming variables and functions across R projects. Update documentation and configuration to reflect the new feature. Enhance LSP functionality with a rename method for symbol references.
Refactor the function to better reflect its purpose of checking if two definitions refer to the same R variable, considering R's function-level scoping. Update references to this function across the codebase to ensure consistent behavior. test(rename): add test for renaming with reassignment in same scope Add a test case to verify that renaming a symbol within the same scope correctly updates all occurrences, including reassignments. This ensures that the refactored function handles R's scoping rules properly during rename operations.
80030d2 to
2b50a02
Compare
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.


This is implementing lsp rename into
r_ls.Here is a quick demo (I am using
lspsagafor my rename UI):