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

Tooltips for .:, .:? and etc don't work #184

Closed
unorsk opened this issue Aug 11, 2021 · 6 comments
Closed

Tooltips for .:, .:? and etc don't work #184

unorsk opened this issue Aug 11, 2021 · 6 comments
Labels

Comments

@unorsk
Copy link

unorsk commented Aug 11, 2021

Hey and thanks for all the good work done on the plugin!

I'm using argonaut that has a couple of operators like ".:" and for some reason tooltips don't work on those operators (perhaps it has something to do with the way these are - the leading dot may be causing the confusion?)

While tooltips seem to appear for <> or ~> or other operators.

I'm using the latest plugin version, and VSCode "Version: 1.59.0-insider (Universal) Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8"

Hope that helps :)

PS Jump to definition doesn't work either on the above mentioned operators, might be somehow related to the problem.

@nwolverson
Copy link
Owner

The leading dot might be causing confusion with module separators, yes

@natefaubion
Copy link

Is there opportunity to use the CST lexer to normalize handling of things like this? I can understand why you might not want to include the dependency, but it might help with edge cases like this.

@nwolverson
Copy link
Owner

Probably, the current code is in a hard to understand place because it's driven by the need to match the (qualified) identifier around the cursor - it does some weirdness in separately matching regexes before and after the cursor, when probably it should just tokenize the current line (I guess things that are split over lines are still fine at a lexical level) and compare the cursor position with the result of that

I note that for qualified imports Data.Lens..= has the same issue, as does Data.Array...

@nwolverson nwolverson changed the title Tooltips for .:, .:? and etc don't work [BUG] Tooltips for .:, .:? and etc don't work Aug 11, 2021
@nwolverson nwolverson added the bug label Aug 11, 2021
@natefaubion
Copy link

natefaubion commented Aug 11, 2021

(I guess things that are split over lines are still fine at a lexical level) and compare the cursor position with the result of that

This is only problematic for string literals, but otherwise qualified names cannot contain whitespace.

@nwolverson
Copy link
Owner

Same issue as nwolverson/purescript-language-server#146

@nwolverson
Copy link
Owner

Linked issue is fixed since 0.15.5 (which is already in the current ide-purescript release)

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

No branches or pull requests

3 participants