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

Symbol names are not found for import unless the cursor is positioned at the end of the name #10

Closed
bytenik opened this issue Jul 11, 2016 · 8 comments

Comments

@bytenik
Copy link

bytenik commented Jul 11, 2016

For example:

image

@Sammons
Copy link
Owner

Sammons commented Jul 12, 2016

@bytenik check it out in 0.0.6

In this version I also backtrack over a variety of special chars, and take the first word as the victor for the symbol to guess. This means having the cursor inside or after abc.b.c().d should result in abc being imported.

Please confirm this is what you are looking for when you get a chance.

Thanks!

@bytenik
Copy link
Author

bytenik commented Jul 13, 2016

Nope, not quite:

image

This actually seems to have broken previous working behavior when positioned at the end of the symbol. I think you're backtracking correctly but not detecting the end of the symbol properly.

@bytenik
Copy link
Author

bytenik commented Jul 13, 2016

If I highlight the symbol and resolve, it does work. However, I also get that same error from above (including the comma, which is not highlighted).

@Sammons
Copy link
Owner

Sammons commented Jul 13, 2016

I see, my bad, I'm surprised this wasn't causing errors elsewhere. Should be fixed now in 0.0.7

@bytenik
Copy link
Author

bytenik commented Jul 14, 2016

Closer but still not quite. In the following screenshot, running resolve on the OrdinalPipe symbol (with cursor as positioned) yields no error but also yields no import. If I highlight just the symbol without the brackets, it works.

image

@Sammons
Copy link
Owner

Sammons commented Jul 14, 2016

This thread will go forever at this rate, I'll fix this when I can, I think in general that behavior comes from trying to import an empty string.

@Sammons
Copy link
Owner

Sammons commented Jul 21, 2016

@bytenik on to the next one ;)

@bytenik
Copy link
Author

bytenik commented Jul 22, 2016

Works!

@bytenik bytenik closed this as completed Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants