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?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:21 (21 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Jma353 a PR is highly appreciated.
@Jma353 the error should be gone with
vscode-piece-tree@1.1.1
.