Client, server, and protocol implementations of CXP (Code Extension Protocol), a way to build cross-platform code extensions that run in multiple editors, code hosts, code review/search tools, etc.
- Editor extensions are tied to a single editor, so all the great work that goes into building editor extensions is fragmented among 10+ editors.
- Most dev teams use a variety of editors, which means that it's hard to configure tooling (such as code intelligence or linters) in a consistent way in everyone's editors.
- Other coding tools you use (such as code hosts and code review/search tools) don't support extensions, so you lose useful context and functionality when interacting with code outside your editor.
The (proposed) solution
CXP will let you build an extension once and use it everywhere you edit or view code.
- CXP protocol: an RPC protocol that is a rough superset of Language Server Protocol (LSP), spoken between CXP extensions and CXP clients (such as editors).
- CXP extension: like an editor extension, except written to speak CXP instead of the editor-specific extension API. It exposes functionality such as code intelligence, linting, Git line blaming, code coverage, etc., just like today's existing editor extensions.
- CXP client: editors, code hosts (such as GitHub, specifically the file, PR "Files changed", and diff pages), code review tools, code search tools, etc.
npm installnpm test
This library does not depend on Microsoft/vscode-languageserver-node (except for the types) because Microsoft/vscode-languageserver-node uses Node.js APIs that are not available in the browser and its footprint is rather large (1+ MB).
The CXP protocol is based on the Language Server Protocol (LSP). This library is based on the Microsoft/vscode-languageserver-node implementation of LSP.