@skaldapp/monaco-sfc

A Monaco Editor language server for Vue Single File Components (SFC) providing syntax highlighting, IntelliSense, error detection, and more
15,421
Install
npm install @skaldapp/monaco-sfc
Latest Version:1.2.15
License:AGPL-3.0-only
Last Updated:Oct 21, 2026
Links: npm
Maintainer: skaldapp

@skaldapp/monaco-sfc

A Monaco Editor language server for Vue Single File Components (SFC). This library provides Vue language support for the Monaco editor, offering rich editing experiences with syntax highlighting, IntelliSense, error detection, and more for Vue SFCs.

Features

  • Vue SFC (Single File Component) support
  • Syntax highlighting for Vue, HTML, CSS, JavaScript, and TypeScript
  • IntelliSense and auto-completion for Vue templates and scripts
  • Error detection and linting
  • Auto-closing of tags and brackets
  • Folding support for regions
  • Proper indentation and formatting rules
  • Integration with Monaco Editor's web worker system

Installation

npm install @skaldapp/monaco-sfc

Usage

import initMonacoSFC from "@skaldapp/monaco-sfc";

// Initialize with your Monaco instance
initMonacoSFC(monaco);

// Now you can create Vue SFC editors
const editor = monaco.editor.create(document.getElementById("container"), {
  value: "<template>\n  <div>Hello Vue in Monaco!</div>\n</template>",
  language: "vue",
});

Dependencies

This package relies on:

  • @volar/monaco - Vue Language Server integration for Monaco
  • @vue/language-core - Vue Language Service core
  • @vue/language-service - Vue Language Service
  • monaco-editor - The Monaco Editor
  • vscode-uri - URI handling for VS Code compatibility

How It Works

This package sets up the Monaco Editor to handle Vue SFCs by:

  1. Registering the 'vue' language with Monaco
  2. Loading appropriate language configurations for Vue and its embedded languages
  3. Creating a web worker to handle language service operations
  4. Activating features like auto-insertion, markers, and syntax providers

License

AGPL-3.0-only

Related Packages

vue-eslint-editor

An embedded editor component for ESLint.

136,638 36
vue-template-populator

A Vue library to enhance the automation of methods and computed props based on y...

8,433 4
mavon-editor

Vue markdown editor

556,330 6,562
x-mavon-editor

Vue-next markdown editor

10,809 6,559
steem-editor

Vue markdown editor

5,835

Version History

Version Released License
1.2.15 AGPL-3.0-only
1.2.14 AGPL-3.0-only
1.2.13 AGPL-3.0-only
1.2.12 AGPL-3.0-only
1.2.11 AGPL-3.0-only