LSP supports many interesting use cases. I'm going to list a few that are within reach:
document formatting
linting
symbols (listing, renaming)
workspace/symbol requests to list all the symbols in the workspace matching a query stringtextDocument/documentSymbol to list all the symbols in a documenttextDocument/rename for renaming a symbol in the workspace (this could be cool, and potentially achievable with Scalafix)go to definition
textDocument/definition is for jumping to the definition of a symbol (this has been done already in metadoc)autocompletion
A reference to the full spec of LSP is here: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md
To me, autocompletion, textDocument/definition and textDocument/rename are the killer features. I'm glad you're working on this @gabro, I think a hybrid of the presentation compiler and semanticdb can be a very interesting avenue to explore to provide people with better tooling.
I agree @jvican! Those would finally give any editor a great Scala experience without the burden of a full-fledged IDE.
definition and rename are definitely within reach using scalameta and scalafix respectively.
For autocompletion, I've zero experience on how the presentation compiler works, but I hope that will change soon :D
Hi! I just discovered this project and I'm really glad that it already exists! 👏 I was thinking how to use scalameta for creating a Scala language server, but I don't know almost anything about it and it would take me a lot of time to start and make anything working..
Here are some more LSP requests that, I think, could be in reach of SemanticAPI:
textDocument/hover to show type information on hovertextDocument/signatureHelp to show method/constructor signature when filling its parameterstextDocument/references to find project-wide references for the given symbol. I guess, once you have workspace/symbol, it should be easy.textDocument/documentHighlight similar to references, but local to the document (docs also say it's more "fuzzy")textDocument/codeAction to apply scalafixes?Those are really good suggestions @laughedelic! We've just got the ball rolling and it's very promising. We'll see where this take us :)
autocomplection - I have seen IDEs help complect code before but I'm not sure it's a feature we should enable.
@ShaneDelmore you mean snippets?
I was just being silly. To be more helpful, regarding the original bullet point:
/s/autocomplection/autocompletion
I think the roadmap we have in the README is comprehensive enough. Closing.