I want to initiate a user action from Visual studio code. which would read the current opened text document, extract a piece of code by some kind of UI action (a custom button, or through CodeAction if possible), send it to the server using the Language Server Protocol, does some work and returns some output back to client.
I've read the Language Server Protocol specifications for CodeAction but its normally used only for quickfixes and refactoring, can i use it for any other custom action? If so, how?