nwolverson / vscode-ide-purescript

PureScript IDE support for VS Code

Home Page:https://marketplace.visualstudio.com/items/nwolverson.ide-purescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

unorsk opened this issue · comments

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.

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

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.

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...

(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.

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