[ANN] VSCode extension 1.10.0 is out

Happy holidays!

We’ve just released version 1.10.0 of the VSCode extension for ReScript. It contains a bunch of bug fixes and general improvements, and also a few new features. The full changelog can be found here: Release 1.10.0 · rescript-lang/rescript-vscode · GitHub

There’s one recent thing we’ve worked a lot on that I’d like to write a little extra about:

Improved pipe autocomplete

TLDR; Pipe autocomplete has been much improved and you should now get autocomplete for your pipes (->) in almost all circumstances, and most often even without needing to save/compile in between.

We’ve worked a lot on improving pipe autocompletion for this release.

Previously, you would get autocomplete when using pipes only for the first pipe in the pipe chain, and only if the type of the thing you’re piping wasn’t parameterized (returns a type parameter that needs to be instantiated). The improvements we’ve made mean that you should now:

  • Get autocomplete for all pipes in when doing multiple pipes (someVal->Array.map(v => v + 2)->Array.filter(...) all of those should give completions)
  • As long as the type each function is returning isn’t parameterized (and therefore needs compilation to figure out what it actually is), you should be able to get completions for all pipes without saving/compiling
  • In the cases where a function you’re piping is parameterized/returns a type parameter (like how Array.reduce returns 'a) you’ll need to save the file so it compiles and the type parameter gets known, but after that you should be able to get completions again

Please give this a spin and report any issues you see. We want piping to feel natural and be as ergonomic as possible.

As always, remember to post any issues you find on the issue tracker.

28 Likes

Hello and congratulations for all these improvements. It’s really great.
I’m having some troubles with the auto-completion :

I have Belt open in global and I use rescript-vscode in version 1.11.4.

When I use an array, it autocompletes with Js.Array2 instead of Array (from Belt).
When I use a Result.t<'a>, it autocompletes with Pervasives.x
When I use a Future.t<'a> (from rescript-future), it works great.

Do you know how to improve this and use Belt open in global for auto-completion?

2 Likes

Hi! Thank you. Would you please open an issue in the GitHub repo?