microsoft / microsoft/language-server-protocol

Scratch buffers

Open
#1,030 5 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

document synchronization feature-request
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

There's no schema for scratch buffers (a buffer in the editor that has no associated file).

I propose something like buffer://<some-string-id-provided-by-client> to tell a language server: "Here's a document that's opened, but it has no associated file on disk".

Because the content of the buffer is provided in the textDocument/didOpen notification there shouldn't be a technical roadblock to this.

Because a server knows the workspace folders, it can deduce some basic properties like find an associated config file (e.g. tsconfig.json). So it should be able to provide basic services to scratch buffers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the LSP protocol definition for textDocument/didOpen and the proposed buffer:// URI shape. Check how the notification conveys in-memory content and how workspace folders relate to configuration discovery. Done means a specified, interoperable scratch-buffer schema and documented behavior for basic services.

Written by the indexing model from the issue text.

Assessment

Domain
api, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.