Socket
Socket
Sign inDemoInstall

cxp

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cxp

Code Extension Protocol (CXP) client, server, and protocol library for JavaScript/TypeScript


Version published
Weekly downloads
40
decreased by-6.98%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 01 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc