Refactoring Swift Code#
The available refactorings are currently based on Apple’s SourceKit-LSP. At this time, “Rename” is the only refactoring available.
Rename Refactoring#
Invoke Refactor → Rename… on a declaration or on a reference to rename a symbol.
Because the refactoring is computed by SourceKit-LSP, a few things differ from the languages your IDE supports natively:
- Noctule sends the pending editor changes to the server before the rename starts, so you may see a short modal progress dialog.
- Which usages are found depends on SourceKit-LSP’s index. Enable background indexing so that usages in other files are renamed as well.
- Names containing a space are rejected, unless you wrap the whole name in backticks, for example
`my name`.
If you need another refactoring, please open a feature request on GitHub.