Skip to content

Any plans to support 'Rename Symbol', 'Go to Implementations' or 'Go to References'? #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
frypf opened this issue Sep 12, 2022 · 5 comments
Labels
enhancement New feature or request sourcekit-lsp SourceKit-LSP issue

Comments

@frypf
Copy link

frypf commented Sep 12, 2022

Is your feature request related to a problem? Please describe.
Wasn't sure if this was a bug, an as-yet unimplemented feature or an idiosyncrasy of my own system, but none of the mentioned shortcuts / context menu items seem to work.

Describe the solution you'd like
It'd be great if we could use Rename Symbol, Go to Implementations or Go to References for our own vars and functions in swift files.

Describe alternatives you've considered
At the moment I'm simply using 'Find & Replace' to locate or rename symbols, but this can be laborious with larger scripts and projects. The advantage of the built-in commands is that they take note of the context and do most of the work automatically.

Additional context
Symbols already seem to be correctly recognised within swift files - they're available within the QuickPicker when using Go to Symbol in Editor…, and alt-clicking on a var or function correctly jumps to the appropriate definition. There was previously a brief mention of implementing these within vknabel/vscode-swift-development-environment, although any work on that was halted as a result of this official extension being published.

@frypf frypf added the enhancement New feature or request label Sep 12, 2022
@0xTim
Copy link
Member

0xTim commented Sep 12, 2022

See #406 for details as it's tracked there. Go to implementation should already work. Rename symbol is waiting on a bug in SourceKit-LSP to be fixed

@frypf
Copy link
Author

frypf commented Sep 12, 2022

My bad, I did an issue search for a few related terms, didn't even think to check the discussions!

@adam-fowler adam-fowler added the sourcekit-lsp SourceKit-LSP issue label Sep 14, 2022
@adam-fowler
Copy link
Contributor

Go to references and Go to implementations should work as long as you have a compiled project.
Rename Symbol is currently not supported by SourceKit-LSP. Here is the relevant issue in the SourceKit-LSP repo swiftlang/sourcekit-lsp#498

The great thing about LSP is once SourceKit-LSP implement it and advertise they support it, it work automatically without any changes to the extension.

@broken-bytes
Copy link

Go to references and Go to implementations should work as long as you have a compiled project. Rename Symbol is currently not supported by SourceKit-LSP. Here is the relevant issue in the SourceKit-LSP repo apple/sourcekit-lsp#498

It does not work.
At least not on Windows.
See #479

@adam-fowler
Copy link
Contributor

The main branch SourceKit-LSP has this implemented and I've tested it works, so I'm going to close this as complete. The changes will be include in Swift 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sourcekit-lsp SourceKit-LSP issue
Projects
None yet
Development

No branches or pull requests

4 participants