🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@vue/language-service

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/language-service

<a href="https://github.com/vuejs/language-tools/blob/master/LICE

latest
Source
npmnpm
Version
3.2.8
Version published
Weekly downloads
70K
0.04%
Maintainers
2
Weekly downloads
 
Created
Source

@vue/language-service

NPM version License

A collection of Vue language service plugins, providing the core implementation for IDE features. This package integrates various language services such as TypeScript, CSS, HTML, Pug, and Emmet, and adds Vue-specific feature plugins.

Installation

npm install @vue/language-service

Usage

import { createVueLanguageServicePlugins } from '@vue/language-service';
import * as ts from 'typescript';

// Create Vue language service plugins
// The optional second argument `client` is used for communication with @vue/typescript-plugin
const plugins = createVueLanguageServicePlugins(ts);

Built-in Plugins

General Language Services

PluginSourceDescription
JSONvolar-service-jsonJSON language service
Pug Formatvolar-service-pug-beautifyPug formatting
Emmetvolar-service-emmetEmmet abbreviation expansion
TypeScript Syntacticvolar-service-typescriptTypeScript syntactic features
TypeScript Doc Commentvolar-service-typescriptJSDoc comment templates

Vue-specific Plugins

PluginDescription
vue-sfcSFC structure support, including folding, symbols, document links
vue-templateTemplate language service, supporting HTML and Pug
vue-format-per-blockFormatting per block
vue-compiler-dom-errorsVue compiler error diagnostics
vue-directive-commentsDirective comment support (<!-- @vue-skip -->, etc.)
vue-component-semantic-tokensComponent semantic tokens
vue-inlayhintsInlay hints (destructured props, inline handlers, etc.)
vue-missing-props-hintsHints for missing required props
vue-autoinsert-dotvalueAuto-insertion of .value for ref variables
vue-autoinsert-spaceAuto-insertion of spaces in template interpolations
vue-scoped-class-linksScoped CSS class name links
vue-template-ref-linksTemplate ref links
vue-extract-fileExtract component refactoring
vue-document-dropAuto-generation of import on file drop
vue-document-highlightsDocument highlights
vue-suggest-define-assignmentAssignment suggestions for defineProps, etc.
vue-twoslash-queriesTwoslash query support (// ^?)
cssCSS language service, supporting v-bind and CSS Modules
typescript-semantic-tokensTypeScript semantic tokens

Usage with @volar/kit

To use the language service in a Node.js environment (e.g., for linting or testing):

import { createLanguage, createVueLanguagePlugin } from '@vue/language-core';
import { createLanguageService, createVueLanguageServicePlugins } from '@vue/language-service';
import ts from 'typescript';

const language = createLanguage([
  createVueLanguagePlugin(ts, compilerOptions, vueCompilerOptions, asFileName),
]);

const service = createLanguageService(
  language,
  createVueLanguageServicePlugins(ts),
  env,
);

License

MIT License

FAQs

Package last updated on 04 May 2026

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