Definition Provider

Lifecycle

Provide Definition

DefinitionProvider.provideDefinition(document, position) { 
    refAtPos := getReferenceAtPosition(document, position)
    
    uris := 
    out = uris.map uri { Location.new(uri)}

    if (out.length > 1) return out
    if (out.length = 1) { ... } 

    nonNoteFile = maybeNonNoteFileDefinition
    if nonNoteFile return provideForNonNoteFile
    else { 
        provideForNewNote
    }
}

maybeNonNoteFileDefinition { 
    ...
} 

provideForNonNoteFile(qs) { 
    out = new GotoNoteCommand(qs, kind: NON_NOTE)
    if !out return
    return Location.new(...)
}

provideForNewNote { 
    ...
}

Past Tasks


Backlinks