Closed
Description
I'm trying to figure out how textDocument/codeAction and workspace/executeCommand
are supposed to work together.
I think what should happen when code is selected and a command is ran like extractMethod is as follows:
- Client sends a codeAction request to the server when text is selected. It contains the start/end range of the code selected. (I believe the server needs to store this information somewhere and update it whenever changed.)
- The users uses a command like extractMethod. The client would send a executeCommand to the server that contains the command name and some arguments. (Still haven't figured out if you can add your own arguments to this request)
- The server would run the command and send a workspace/applyEdit to the client to finalize the changes.
Is this correct so far? Does anything further need to happen? Document Syncing or anything ?
Thanks