question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Leverage vscode "Piece Tree" string buffer in TextDocument representation

See original GitHub issue

@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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

3reactions
dbaeumercommented, Apr 5, 2019

@Jma353 a PR is highly appreciated.

1reaction
rebornixcommented, Apr 15, 2019

@Jma353 the error should be gone with vscode-piece-tree@1.1.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text Buffer Reimplementation, a Visual Studio Code Story
Piece table is a data structure used to represent a series of edits on a text document (source code in TypeScript):
Read more >
TEXT EDITOR BUFFERING IMPLEMENTATION WITH OFFSETS ...
A piece tree includes one or more string buffers and a tree, such as a balanced binary tree. Tree nodes identify respective substrings...
Read more >
VS Code's piece table implementation of text buffer
I thought this article about the new implementation of text storage in Visual Studio Code was worth reading. Its essentially a tree of...
Read more >
Groovy Language Documentation
Text literals are represented in the form of chain of characters called strings. Groovy lets you instantiate java.lang.String objects, as well as GStrings ......
Read more >
Bug List
580646, Sirius, Tree, sirius.tree-inbox, NEW, ---, Wrong tree item expand behavior after creation of elements using references, 2022-09-09.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found