nwolverson / purescript-language-server

MIT License
184 stars 41 forks source link

Can't import operator with code action #127

Closed andys8 closed 3 years ago

andys8 commented 3 years ago

Issue

module NewModule where

x = "a" ^ "b"

image

It does offer the action. Importing won't add it though.

Additional information

image

With auto completion import ClassNames ((^)) will correctly be added.

And also the code action does seem to work for other operators like && and +. So it looks like it wouldn't work for certain operators (e.g. (^)).

nwolverson commented 3 years ago

This works fine for me, with the classnames example, both auto complete and the code action.

Can you share the language server version, PureScript version, being used - I suspect this may be an issue just with pre-0.14 PS / pre 0.15.0 language server, in the case where you have the same operator in multiple namespaces available for import. See #118

andys8 commented 3 years ago

Languageserver 0.15.0 (purs 0.13.8) shows an error message:

image

With purs 0.14.0, ls 0.15.0 and a fake module for CassNames because the current isn't updated, it is working :)

image image

Thanks, will close the issue.