Skip to content

Util function to convert from std::ops::Range<usize> to tower_lsp::lsp_types::Range #1

@kmaasrud

Description

@kmaasrud

The former is simply an index-range, while the latter is a range of two Positions, each represented by line/col numbers. This does not seem to be as trivial as I hope to convert between.

To make things harder, the ranges mdzk give for each link is obviously based on the content of the note when parsing links. This content has all the front matter stripped. Not only that, but the note.content that is stored, is the CommonMark-form, which means that all wikilinks are stored as their CommonMark equivalent. This might need to be handled inside mdzk itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions