Skip to content

LSP: support Go to Type Definition for type aliases #5227

@jeffreymorrisondev

Description

@jeffreymorrisondev

Steps to reproduce

In VSCode, Ctrl+Click (go to definition) works for custom types but not for type aliases.

Code:

pub type MyCustomType {
  Variant1
  Variant2
}

pub type MyTypeAlias =
  #(Int, String, MyCustomType)

pub fn main() {
  let _a: MyCustomType = Variant1
  let _b: MyTypeAlias = #(1, "Test", Variant2)
}

Expected: Ctrl+Click on MyTypeAlias in main() should jump to the type definition.

Actual: Nothing happens when clicking MyTypeAlias, but clicking MyCustomType works fine.

Environment

  • Gleam: 1.13.0 and 1.14.0
  • Editor: VSCode
  • OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributions encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions