Implement find references and rename for locals
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the reported local-variable rename case in Rails 8 using the supplied Ruby snippet, checking behavior in VS Code and Neovim. Trace the existing find-references and rename entry points; done means references and rename work for the local variable password in this example without the reported error.
Written by the indexing model from the issue text.
Description
Description
Ruby LSP Information
VS Code Version
1.97.0-insider
Ruby LSP Extension Version
0.8.19
Ruby LSP Server Version
0.23.7
Ruby LSP Add-ons
- Ruby LSP Rails
- RuboCop
Ruby Version
3.4.1
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
- catppuccin-vsc (3.16.0)
- dotenv (1.0.1)
- prettier-vscode (11.0.0)
- ruby-extensions-pack (0.1.12)
- ruby-lsp (0.8.19)
- sorbet-vscode-extension (0.3.37)
- vim (1.29.0)
- vscode-eslint (3.0.10)
- vscode-mdx (1.8.13)
- vscode-ruby (0.28.0)
Ruby LSP Settings
Click to expand
Workspace
{}
User
{
"enabledFeatures": {
"codeActions": true,
"diagnostics": true,
"documentHighlights": true,
"documentLink": true,
"documentSymbols": true,
"foldingRanges": true,
"formatting": true,
"hover": true,
"inlayHint": true,
"onTypeFormatting": true,
"selectionRanges": true,
"semanticHighlighting": true,
"completion": true,
"codeLens": true,
"definition": true,
"workspaceSymbol": true,
"signatureHelp": true,
"typeHierarchy": true
},
"featuresConfiguration": {},
"addonSettings": {},
"rubyVersionManager": {
"identifier": "auto"
},
"customRubyCommand": "",
"formatter": "auto",
"linters": null,
"bundleGemfile": "",
"testTimeout": 30,
"branch": "",
"pullDiagnosticsOn": "both",
"useBundlerCompose": false,
"bypassTypechecker": false,
"rubyExecutablePath": "",
"indexing": {},
"erbSupport": true,
"featureFlags": {}
}
Reproduction steps
Add the following test case in Rails 8 and try to rename the variable password:
def test_password_is_not_too_short
password = "w" * (User::MIN_PASSWORD_LENGTH - 1)
@user.password = password
@user.password_confirmation = password
end
Getting the error message The element can't be renamed.
Neovim
Same issue in neovim. But message is different though:
ruby-lsp --version: 0.23.6
Question
I am not sure if this is a bug. Maybe this is a limitation of Ruby-lsp. Please close the issue if this issue is scoped to be fixed as part of the roadmap or if it cannot be fixed.
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 281
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/ruby-lsp
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug help-wanted pinned
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug pinned
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in Shopify/ruby-lsp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TheOdinProject/curriculum#31417 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
glossarist/glossarist-ruby#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
palladius/rails8-app-on-gcp#145 ·