This is a prototype patch of implementing a generic mechanism to perform a chain of refactorings.
An example (extract + rename) of how it works:
- the extract tweak returns a vector of steps ([applyEdit, rename]) during the apply stage.
- clangd sends a workspace/applyEdit to the editor and waits for the reply;
- the editor applies the edit and sends back a reply;
- clangd sends a custom request clangd.triggerRename to the editor (edito needs to implement the command);
- the editor executes the clangd.triggerRename request (triggers the LSP rename), and replies to clangd;
- clangd receives the reply, and there is no more steps, so the "apply tweak" workflow is finished;
A demo: