Skip to content

Provide Auto-Completion for Type Signatures #2359

@Hyalunar

Description

@Hyalunar

Futhark does a lot of work to infer the type for bindings and it provides the inferred type via textDocument/hover for LSP-Clients.

I like to have the types inferred as I write. This allows me to refactor something I'm working on without clashing with types I wrote out. Once I consider something done, I will write down the types to avoid confusion for future me.

It is currently possible to hover over the usage (not definition) of a function and copy the inferred type from there, but this is tedious.
Screenshot using futhark lsp in neovim, hover info of a function usage:

Image

Asciinema Recording of the process: asciicast

The Language Server could provide a code lens or code action to automatically fill the inferred type.

Reference Screenshot from HLS in neovim with a type signature code lens:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions