{"library":"vscode-languageserver-textdocument","type":"library","category":null,"description":"The `vscode-languageserver-textdocument` package provides a lightweight and immutable in-memory representation of a text document, specifically designed for use within Node.js-based Language Server Protocol (LSP) servers. It abstracts away the complexities of file system interactions, offering a consistent model for document content, versioning, and change tracking. This is a foundational utility within the larger `vscode-languageserver-node` monorepo, which is actively maintained by Microsoft. While the monorepo sees frequent `next` releases (e.g., `10.0.0-next.x` for server components), `vscode-languageserver-textdocument` itself is currently stable at version `1.0.12`, indicating a mature and less frequently changing API for its core document management functions. It is written in TypeScript and ships with comprehensive type definitions, making it well-suited for TypeScript-first development environments. Its primary differentiator is its focus on being a simple, efficient, and reliable document model optimized for LSP server operations like diagnostics, completions, and refactoring.","language":"javascript","status":"active","version":"1.0.12","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install vscode-languageserver-textdocument","imports":["import { TextDocument } from 'vscode-languageserver-textdocument';","import { TextDocument } from 'vscode-languageserver-textdocument';\nconst doc = TextDocument.create(uri, languageId, version, text);","import { TextDocument } from 'vscode-languageserver-textdocument';\nconst newDoc = TextDocument.applyEdits(oldDoc, changes);"]},{"cmd":"yarn add vscode-languageserver-textdocument","imports":[]},{"cmd":"pnpm add vscode-languageserver-textdocument","imports":[]}],"homepage":"https://code.visualstudio.com/api/language-extensions/language-server-extension-guide","github":"https://github.com/Microsoft/vscode-languageserver-node","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vscode-languageserver-textdocument","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/vscode-languageserver-textdocument/compatibility"}}