Skip to content

Leverage vscode "Piece Tree" string buffer in TextDocument representation #476

@Jma353

Description

@Jma353

@rebornix recently made a post w.r.t. text buffering in the main vscode project. See this code.

It would be awesome if FullTextDocument, TextDocument implementation used by things such TextDocuments (document manager bundled in the server package), used this buffering under the hood, rather than a plain string / lazy-loaded offset mapping.

This buffered approach, combined with a supporting incremental sync in TextDocuments API (something I want to put a PR up for, and mentioned in #473) would afford language server / client developers a much more performant API for dealing with text documents.

Could we move this text buffer implementation into this repo? Make it a separate npm module? Open to peoples' thoughts on this?

cc: @dbaeumer @jrieken

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions