Skip to content

Add LSP Goto Type Definition support#805

Merged
dzhou121 merged 1 commit intolapce:masterfrom
MinusGix:goto-type-definition
Jul 18, 2022
Merged

Add LSP Goto Type Definition support#805
dzhou121 merged 1 commit intolapce:masterfrom
MinusGix:goto-type-definition

Conversation

@MinusGix
Copy link
Copy Markdown
Member

Closes #790
This adds a command for going to the type definition variable if the LSP supports it.
Ex:

fn thing(text: String) {
    let a = text|.trim();
}

where | is the cursor
The command will then go to the file where String is defined. This is faster, especially in cases where the variable is a field that you'd have to jump to to then jump to the actual type that it is.
This does not set a keybind for it as VSCode does not set one. (Personally, I think this should have a keybind, but I don't know what would be a good default)

@MinusGix MinusGix added the A-lsp Area: LSP, assists and code completion label Jul 18, 2022
@dzhou121 dzhou121 merged commit 37f84b9 into lapce:master Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lsp Area: LSP, assists and code completion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go to type definition

2 participants