Closed hugobarauna closed 1 week ago
This is hard to do in the client because the parsing of Elixir code and understanding of when there is a definition happens in the server, so there is always a delay. We could try to make it work for some cases by pushing logic to the client, but probably not worth it.
Technically we have access to AST on the client, but there would be a lot of false positives, because we only jump if the module is defined in the notebook, and for other modules we don't know that upfront. So giving user the impression that the function is clickable, but then nothing happens, may be confusing.
@jonatanklosko I see, thanks.
So, closing this issue.
Regarding the "go to definition" feature, it would be nice if we changed the mouse cursor to give a hint the definition is clickable, similar to how VS Code works:
https://share.cleanshot.com/T61XW8F9
The idea is that when hovering over a module or function that has a definition inside the notebook, when the user presses/holds Command ⌘ (for macOS) or Ctrl (for Windows/Linux), the mouse cursor changes to "cursor".
If the user stops pressing/holding Command ⌘ (for macOS) or Ctrl (for Windows/Linux), the cursor will return to its previous value ("text").