nwolverson / purescript-language-server

MIT License
184 stars 42 forks source link

Autocompletion not working for qualified modules #65

Closed vanceism7 closed 4 years ago

vanceism7 commented 4 years ago

Hey there, thanks for making this awesome lsp wrapper for purescript.

I'm currently working at creating the purescript adapter for lsp-mode in emacs. It seems that it's working for the most part, but I'm not receiving any autocompletion prompts for fully qualified modules. E.g:

import Data.Foo as Foo
-- Typing Foo. doesn't bring up any autocompletion prompts for types/functions within Foo

I notice this warning popping up in the logs anytime I try to "dot" into a module

[Warn] Listing the loaded modules command is DEPRECATED, use the completion command and filter it to modules instead

Does this perhaps have anything to do with the issue. I gave this a try with vscode as well. It sort of works in vscode if you know what you're looking for, but doesn't give a valid set of members right off the bat. I also noticed this error in the logs when running vscode.

Thanks again!

nwolverson commented 4 years ago

This should bring up completions after a single character or manually triggering completion - the warning can be ignored, it will be resolved in the future, it's history. But otherwise this still seems to be completing qualified modules to me in vscode

nwolverson commented 4 years ago

Turns out we can just specify '.' as a trigger character. Not sure why we didn't add it sooner