Skip to content

Content mapper docs - #65582

Open
Gabriela Araujo Britto (gabritto) wants to merge 9 commits into
mainfrom
gabritto/docs
Open

Gabriela Araujo Britto (gabritto) wants to merge 9 commits into
mainfrom
gabritto/docs

Conversation

@gabritto

Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for doing this! I feel so much better about my odds of getting everything done by our release 😄

One additional short section in the implementation doc should be about compatibility:

  • The protocol will only change in backward-compatible ways after 7.1 is officially released. New features may be added with an LSP-like capabilities negotiation in initialize.
  • For forward compatibility, tuples should be considered open-ended. A mapper should not assert an exact tuple length or read elements beyond ones it knows how to handle.

}
```

This is useful when the original content mapped files will be emitted to a different format, rather than left as-is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this is helpful here?

output-extensions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's useful for understanding output extensions, but I wouldn't want to get into details here. We could either revisit output extensions with a bit more detail in the emit section, and add the diagram, or add that to your PR, which I link to.

@gabritto
Gabriela Araujo Britto (gabritto) marked this pull request as ready for review November 25, 2026 20:01
Copilot AI balanced review requested due to automatic review settings November 25, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved documentation errors in compiler prerequisites, STDIO framing, request handling, position mapping, and the public API property name can cause configuration failures, stalled cleanup, or incorrect mapper implementations.

5 open issues
What changed in this PR

This documentation-only PR explains how content mappers integrate specialized file formats with TypeScript’s compiler and language server.

Changes:

  • Introduces mapper configuration, file inclusion, and CLI/editor support.
  • Documents implementation protocols, span mappings, diagnostics, compilation, and API integration.
  • Adds diagrams illustrating atom, verbatim, and alias mappings.
File Description
docs/​content_mappers/​intro_content_mappers.md Getting-started guide for configuring and using content mappers.
docs/​content_mappers/​impl_content_mappers.md Implementation guide covering protocols and compiler/editor integration.
docs/​content_mappers/​add-span-mappings.svg Illustrates atom and verbatim mappings and diagnostic locations.
docs/​content_mappers/​add-span-mappings-alias.svg Illustrates alias mappings and diagnostic name substitution.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants