gleam-lang/gleam
View on GitHubLSP: sort complete suggestions after a pipe based on types
Open
#3,297 opened on Jun 19, 2024
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