vscode-swift
vscode-swift copied to clipboard
Add placeholder text for protocol requirements
Is your feature request related to a problem? Please describe.
When add missing protocol requirements, it will add plain text <#code#> instead of placeholder text (can do navigation by tab and delete easily ) to code.
Describe the solution you'd like Add placeholder text like this https://www.youtube.com/watch?v=0XMkg_i5Fqw
Additional context

Just had a chat with sourcekit-lsp guys and they are going to file a bug internally against sourcekit-lsp to return the correct text for LSP placeholder snippets.
This PR in sourcekit-lsp should fix your issue https://github.com/apple/sourcekit-lsp/pull/481. Although I doubt we will see this until Swift 5.7
We might be able to get it in a monthly Linux release
We might, but I'd like to reserve my requests, to push to 5.6, for more serious issues, like https://github.com/apple/sourcekit-lsp/pull/476. If I ask for everything to be pushed to 5.6 they'll very quickly get tired of that and the release managers will start pushing back on what could be more serious issues.
I had a further look into this, and snippets are not supported by textDocument/didChange messages. So unfortunately this does not work.
There is also the issue that tabbing between placeholders would be awkward because the placeholders will be replaced by code, which could contain tabs. I doubt users will want to move to the next placeholder if they are in the middle of writing a function.
For the immediate future sourcekit-lsp is going to get rid of the <#code#> text.
This is done, most likely was in 5.7