LSP: Jump to the function name
Improved the "Go to Definition" command to jump to the function name instead of the beginning of the function keyword.
Example:
function foo() {
...
}
foo(); // "Go to Definition" jumps to `foo` instead of `function`.
@iisaduan is working on find-all-refs, so she may have already looked at this code.
Should some tests change? I'm not sure if fourslash tests are available yet.
It's pretty separate from the find all refs work I've been doing, so there's no duplication. But the PR probably should update tests, so we have some sort of reference for what has been ported already/what we expect to work
I could probably test this with my find all refs testing, but it's not quite ready yet
It's good to know that there's no duplication, as that's something I was concerned about since your team seems to be actively working on the ls package. I'll also try to add a test.
I added a basic test. Please let me know if I should cover more test cases, as there are currently no tests for definition.go.
This has unfortunately gotten out of date as main has changed. Any chance you could update this so we can review it?
Yes, let me merge main and resolve the conflicts.
@jakebailey I've merged main and resolved the conflicts.