gleam-lang/gleam

LSP: sort complete suggestions after a pipe based on types

Open

#3,297 opened on Jun 19, 2024

View on GitHub
 (8 comments) (5 reactions) (0 assignees)Rust (21,417 stars) (960 forks)batch import
help wanted

Description

I don't know how functional languages LSPs usually handle this case but it would be nice if suggestions after a pipe are functions that contain the type as the first parameter. i.e:

"hello" |> // <- This would only suggest functions that have String as the first parameter type

If there are multiple pipes, the suggestions should be related to the last output value.

"2" |> int.parse |>  // <- This would only suggest functions that have Result as the first parameter type

Contributor guide

LSP: sort complete suggestions after a pipe based on types · gleam-lang/gleam#3297 | Good First Issue