This package has been deprecated

Author message:

renamed to sourcegraph

cxp

11.5.1 • Public • Published

EXPERIMENTAL: Code Extension Protocol (CXP) support for JavaScript/TypeScript

build codecov code style: prettier sourcegraph: search semantic-release

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.

Status: Experimental

The problems

  1. Editor extensions are tied to a single editor, so all the great work that goes into building editor extensions is fragmented among 10+ editors.
  2. 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.
  3. 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.

Components

  • 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.

Examples

TODO

Protocol

TODO

Usage

TODO

Development

npm install
npm test

Implementation

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).

Acknowledgments

The CXP protocol is based on the Language Server Protocol (LSP). This library is based on the Microsoft/vscode-languageserver-node implementation of LSP.

Readme

Keywords

none

Package Sidebar

Install

npm i cxp

Weekly Downloads

1

Version

11.5.1

License

Apache-2.0

Unpacked Size

1.19 MB

Total Files

563

Last publish

Collaborators

  • sourcegraph-bot