VS Code variable renaming doesn't work in *new* workspaces when Deno plugin is enabled
See original GitHub issueDescribe the bug VS Code’s F2/Ctrl+Shift+R rename for variables doesn’t work in new workspaces when the Deno plugin is enabled. It works fine in TypeScript projects where I haven’t enabled the Deno plugin.
To Reproduce
- Create a new folder and open it in VS Code
- Initialize the Deno plugin for the workspace
- Create a new TypeScript file
- Type some code, e.g.
const tmp = 5;
- Put the cursor on
tmp
- Hit F2 (or use Refactor -> rename from the right-click context menu)
- Type in the new name
Expected behavior The variable and all occurrences of the variable are renamed (this is what happens in projects where the Deno plugin hasn’t been enabled).
Actual behavior Nothing happens.
Screenshots I can provide them, if needed.
Versions Deno plugin version: v3.9.2
VS Code versions:
Version: 1.63.2 (system setup) Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-15T09:40:02.816Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19042
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:8
Top Results From Across the Web
visual studio code - How to rename a workspace in vscode?
1. You should probably go to File --> Close Workspace first, and then use your file explorer to rename the workspace file, and...
Read more >Using Visual Studio Code | Manual
In the panel the setting is Deno: Enable and when manually editing the JSON, the setting is deno. enable . ⚠️ vscode has...
Read more >VS Code API | Visual Studio Code Extension API
A workspace is the collection of one or more folders that are opened in an editor window (instance). It is also possible to...
Read more >Language Server Extension Guide - Visual Studio Code
Note: If your extension is compatible with VS Code versions prior to 1.74.0, ... when the `workspace/configuration` request is not supported by the...
Read more >August 2022 - Visual Studio Code
File rename selection - Pressing F2 selects filename, whole name, or file extension. New Code Action UI - Quickly find the Code Action...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m experiencing similar issues. When I export a const from one file, renaming in that file wouldn’t work, but renaming from another file did successfully rename all instances, and after having done that, renaming in the original file now works. I also tried enabling / disabling the settings @jdelarubia shared above, can’t say if this had an impact. Seems like an intermittent bug which will likely be hard to track down.
@outloudvi figured out that this happens when you open a new workspace and initialize it for Deno the first time. Updated title and steps to reflect this.