Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codingame/monaco-vscode-api

Package Overview
Dependencies
Maintainers
6
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codingame/monaco-vscode-api

VSCode public API plugged on the monaco editor

  • 1.68.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
46K
increased by21.68%
Maintainers
6
Weekly downloads
 
Created
Source

@codingame/monaco-vscode-api · monthly downloads npm version PRs welcome

NPM module that implements the VSCode api and redirects calls to Monaco editor.

The VSCode api is composed of:

  • A lot of classes and tools, which are exported the same way as in VSCode.
  • Some features that are supported by Monaco (Language feature registrations...) which are just forwarded to it (with some transformations)
  • Some features that are not supported by Monaco, and in such case:
    • If it's an important feature: we let the user implement it as they wish.
    • If it's some advanced features that don't make a lot of sense on Monaco (debug, tests...), it just throws an error when you try to use it.

To implement by hands the optional features (type hierarchy, call hierarchy...), you can use the Services namespace from vscode/services:

import { Services } from 'vscode/services'
Services.install({
   languages: {
       registerTypeHierarchyProvider (documentSelector, provider) {
           ...
       }
   }
})

Installation

npm install vscode@npm:@codingame/monaco-vscode-api
npm install -D @types/vscode

Usage

Just import it as if you were in a vscode extension:

import * as vscode from 'vscode'

const range = new new vscode.Range(...)
vscode.languages.registerCompletionItemProvider(...)

FAQs

Package last updated on 13 Jun 2022

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