-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try js2-jump-to-definition first #10
Comments
Indeed, that'd be a good improvement! |
Do you think this approach could be added to an |
TatriX <[email protected]> writes:
Do you think this approach could be added to an `xref-js2`? If so I
make a PR.
Yes, definitely, but only if the feature uses js2 for local definitions.
|
The problem is with |
Using save-excursion can be a workaround until a better solution is
offered by js2.
|
There's also https://github.com/jojojames/smart-jump which is used to configure these kinds of fallbacks. I think it would be better solution to use something like that instead of baking it into the package: different users might have different preferences. As a side note, what advantage does it provide to use |
It uses |
I thought that this package also uses that to filter out noise. I personally use |
js2-mode
has ajs2-jump-to-definition
functions which can jump to a local definition.Currently I'm using a bit hacky approach:
The logic is simple: try jump with js2-mode ast, if it fails for whatever reason fallback to xref.
It would be cool if
xref-js2
could use something like this for local jumps, because current behavior isn't quite good in my opinion.The text was updated successfully, but these errors were encountered: