Skip to content
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

Don't report tags for imported content #45

Open
hoschi opened this issue Aug 9, 2016 · 3 comments
Open

Don't report tags for imported content #45

hoschi opened this issue Aug 9, 2016 · 3 comments

Comments

@hoschi
Copy link

hoschi commented Aug 9, 2016

At the moment jsctags reports tags for imported content, e.g.:

import {foo, bar} from './myModule';

export default foo(bar());

will report the tags foo and bar. This leads to the problem that pressing ctrl+] on foo in line 3, vim will jump to line 1. What I really want is jumping to the definition of foo in './myModule' and not the local declaration of foo. Not reporting the import statements would lead to:

  • pro
    • easy jumping between files
    • smaller tag files
  • contra
    • no listing of declarations from import statements in Tagbar or something like that

In my opinion the pros have more weight than the cons, thoughts?

@sergioramos
Copy link
Owner

foo and bar are still a symbol declared in the scope of that file. IMHO they should be present the tags.

@hurrtz
Copy link

hurrtz commented Jun 6, 2017

Agreed, ctrl-] in line 3 should bring you to line 1 but ctrl+] on line 1 should then lead to myModule.

@hurrtz
Copy link

hurrtz commented Jun 7, 2017

Ok, upon further reading:
This is not an issue with jsctags. When you work with g] you can see that all relevant tags are there, ready to be used. It is more of a problem with vim and tag navigation. Heres something to read on that (and some some solutions which work quite well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants