(Renavigate)[https://github.com/Yiwen-Gao/renavigate]: Enhanced Code Navigation in VSCode
Easy and intuitive code navigation is necessary for a developer to understand and work with large codebases. One text editor feature that I find myself using frequently when I don't understand a particular function/variable usage is to CMD + click on the function/variable name and jump directly to its definition. However, this makes me lose my place in the code, so it's difficult to navigate back to what I was originally looking at. I'd like to automate the renavigation process by implementing a key command or UI button that takes the user from the function/variable definition back to the usage.
On a conceptual level, it's simple to keep track of a user's place in the code with a stack data structure. When the user uses CMD + click, I'll push the current file name/line number to the stack. When the user clicks the back button, I'll pop the most recent file name/line number from the stack and take the user to this address. To incorporate my code into VSCode, I can use the VSCode Extension API.
Is this an issue that other developers face? In other words, is it a problem worth solving? Does VSCode have an existing extension that provides functionality similar to what I've described? Because I've never worked with VSCode's Extension API, I don't know what type of calls it supports. Is the scope of the project too big or too small? There are many edge cases that should be considered. For example, how can I detect if a user jumps to a function/variable definition but manually navigates back to the function/variable usage? In this case, what should the back button do?