Open Octogonapus opened 3 years ago
I think that would require changes to the underlying language server protocol. Looking at the rename
request here, I don't think it supports per request configurations like the one your suggesting. So I think maybe the best strategy would be to open an issue over at the LSP repo and suggest that this be added to the protocol?
Isn't this just a replace operation, which is already support via Ctrl-H
?
Yeah, it is a find/replace operation. My feature request is to integrate it with the existing rename operation. That said, I also frequently use find/replace because the rename operation is inaccurate. Maybe the function of the rename operation needs to be different than I wanted because static analysis in Julia seems to be more ambiguous than in other languages like e.g. Java, so it cannot be as precise and far-reaching as I want.
Yes, static analysis is for sure more limited in Julia. Do you have concrete examples where our current refactor utilities fail?
I will try to start creating some. They often happen in our large codebase and it is difficult to extract snippets I can share.
I have a feature request for the feature to rename symbols inside of comments. I feel this is an important feature for refactoring large amounts of code while preserving the meaning inside comments; I use this feature frequently in IDEs for other languages.
Here is an example of what I mean. Take this code snippet:
If I were to rename the parameter
var_a
, I would like the code snippet to become:The same goes for other symbols, such as the function name.
It would be important to make this an optional feature, though I am not sure how seamless that feature toggle can be within vscode. Maybe that is not a concern in this repository. For example, IntelliJ makes this configurable in a menu next to the symbol you are renaming so that you don't need to open the IDE settings to configure it.
It would also be important to allow the user to select/deselect which rename operations they want to perform. This is important because, by its nature, renaming in comments can try to rename semantically unrelated strings that should not be modified.