Skip to content

navigateToDefinition

navigateToDefinition(target, editor): void

Navigate the editor to target by translating its LSP range into offsets in the editor’s current text and applying the selection. The caller is responsible for ensuring editor.document is the text of the same document target refers to (i.e. a same-document jump); cross-document jumps should be routed through onOpenDefinition, not this function.

LanguageServerDefinitionTarget

NavigationEditor

void