It would be useful to have "go to def" working in roc for vscode. It could start off really "dumb" and say for Cmd just search for Cmd = and Cmd := in all files and list those, without doing any parsing. Shall I make a good first issue for that?
hm, personally I think I'd be frustrated if I pressed goto definition and then it sometimes jumped to the wrong thing :sweat_smile:
because with a text search I know that can happen, whereas with goto definition I expect it to go to the exact correct one!
It could be a standalone plugin where this shortcoming is explicitly stated
I think that frustration is less than not having the feature at all. Remember the point of a tool like that is to be useful, and perfection isn't required for that. Also, with Roc's strictness, the simple solution of text search is guaranteed to have the correct answer somewhere in the list, so the frustration is just that it's not smart enough to tell which is the right answer, not that it won't find it at all.
A couple comparisons:
Go to definition is still pretty useful in many cases in languages like Python where you can't guarantee that the definition will always be found.
ChatGPT achieves usefulness even without 100% correctness, but unlike ChatGPT, this naive Go to definition implementation would never have to make up an answer, and so wouldn't be dangerous or misleading if it's not sure of the right answer.
Also, if it's not part of a standalone plugin, there's a clear way to improve the experience of using it whenever someone gets around to writing a more sophisticated AST-based implementation.
Last updated: Jun 16 2026 at 16:19 UTC