Skip to content

Feat: LS show const values on hover #4280

@metruzanca

Description

@metruzanca

Say you have this setup:

// httpcodes.gleam

pub const redirect = 303

// server_test.gleam
// ...
 response.status
  |> should.equal(httpcodes.redirect)
//                          ^ hovering here currently only shows the type, in this case "Int"

Coming from writing typescript all day, I was expecting to see the value for constants.

const a = 100
console.log(a);
//          ^ shopws "const a: 100"

It would be nice if, like typescript, it showed a message like const redirect: Int = 303. (using valid syntax in this popup to avoid confusion)

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe approach has not yet been decidedhelp wantedContributions encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions