I really miss golang intellisense

One simple thing that makes a big difference for me, and most definitely others coming to rescript too:

go:

func createUser(email string, password string) {
  //...
}

tooltip:

func createUser(email string, password string)

rescript:

let createUser = (email: string, password: string) => {
  //...
}

tooltip

(string, string) => unit

So which is username and which is password?

Are variable names not available to the language server? I think this would be a big improvement if its not too much of a hassle.

Yes I know rescript has named parameters and and go doesn’t, but if there are only 2 or 3 parameters (which is very common), naming them adds way too much noise.

Here’s some more:

rust:

fn createUser(email: &str, password: &str) {
  //...
}

hover:

fn createUser(email: &str, password: &str)

typescript:

function creatUser(email: string, password: string) {
  //...
}

hover:

function creatUser(email: string, password: string): void
1 Like

It’s an additional motivation to use labeled arguments. Even if there are 1 or 2 of them.

4 Likes

Yeah I suggest you use named parameters here, particularly when you have 2 string parameters (and when one of them is a password!).

1 Like

True. Would it be too confusing if intellisense also showed the positional arg name? It might cuz then there’s just a single tilde that you can use to differentiate.

There’s also the argument to use specific (opaque) types to present email, username, etc

2 Likes