nwolverson/vscode-ide-purescript

Question:Can it support data constructor autocomplete?

WendaoLee opened this issue · 2 comments

For instance:

data Test = Test{
    id::String,
    num::Number
}

d::Test
d = Test{
    id:"test",
    num:1.3
}

When I write d = Test{},it would be great joy of showing recording's info:

But sadly,it gets nothing when I press enter.And no tooltip when I try to complete the record.😭

Is there anyway to support this feature?Or this feature exsit but not show because of my inappropriate setting?If so,could some guys tell me how to change that?

The data constructor Test should be autocomplete with vscode default settings, which is to say after typing Te, if you hit your accept completion keybind, should complete to Test. There's a setting "Accept Suggestion on Enter", otherwise it will be on hitting tab.

There is no completion for records, it's a difficult feature to support (because the record part of the type {id::String,num::Number} is a standalone type and there are unlimited options for that).

Yep,I forgot unlimited types.😽All in all,thank you for your reply and works.