grain
grain copied to clipboard
LSP: Support for go to definition navigation
Currently cmd clicking on function invocation does not go to function definition, similarly for module name as well. We could implement go to defination functionality for better developer experience
Yes! This is definitely something we need.
Most of these features are defined in the Language Server Protocol specification, such as https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_definition - so we should open them on the main Grain repo. This plugins repo doesn't do much anymore (other than defer to the CLI command). I'll move this over to the main repo
This is definitely planned, and I had a proof of concept built, but we need to make some tweaks to the compiler output to make the locations available to jump to without bloating the output for normal compilation.
Will remember to open the issue on main repo next time.Thank you 🙏