{"name":"@vue/language-service","version":"2.0.21","license":"MIT","_id":"@vue/language-service@2.0.21","homepage":"https://github.com/vuejs/language-tools#readme","bugs":{"url":"https://github.com/vuejs/language-tools/issues"},"dist":{"shasum":"5365ee7321b9997ecd935b18798a909a9054b2dd","tarball":"http://registry-npm.ywwl.com/@vue/language-service/download/@vue/language-service-2.0.21.tgz","fileCount":69,"integrity":"sha512-AyhoOubcGWC0aA/Ae+VUFszeJ9m+6uWrbYlyjNyHF4RM8aj+ymOjzyPVE4WbER3g9sTNu/zm/zu+Sl5avIDZbg==","signatures":[{"sig":"MEQCIARc2+QWYmoRvCNQZ3Ld2/4Xe3kdkBOJpgx7thlWLAbjAiBmsT/62gYVwH7j3oOBasoUfw66j98OwosGb/HVelWxCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1565304,"size":231921,"noattachment":false,"key":"/@vue/language-service/-/@vue/language-service-2.0.21.tgz"},"types":"./index.d.ts","gitHead":"a5af80e3939a39694abd9dd09a5496bc5fbf6e06","scripts":{"update-html-data":"node ./scripts/update-html-data.js"},"_npmUser":{"name":"johnsoncodehk","email":"johnsoncodehk@gmail.com"},"repository":{"url":"git+https://github.com/vuejs/language-tools.git","type":"git","directory":"packages/language-service"},"_npmVersion":"lerna/3.5.1/node@v20.14.0+arm64 (darwin)","directories":{},"_nodeVersion":"20.14.0","dependencies":{"computeds":"^0.0.1","vscode-uri":"^3.0.8","@vue/shared":"^3.4.0","path-browserify":"^1.0.1","@volar/typescript":"~2.3.0-alpha.15","@vue/compiler-dom":"^3.4.0","volar-service-css":"0.0.50","volar-service-pug":"0.0.50","@vue/language-core":"2.0.21","volar-service-html":"0.0.50","volar-service-json":"0.0.50","volar-service-emmet":"0.0.50","@volar/language-core":"~2.3.0-alpha.15","@vue/typescript-plugin":"2.0.21","@volar/language-service":"~2.3.0-alpha.15","volar-service-typescript":"0.0.50","volar-service-pug-beautify":"0.0.50","vscode-html-languageservice":"npm:@johnsoncodehk/vscode-html-languageservice@5.2.0-34a5462","vscode-languageserver-textdocument":"^1.0.11","volar-service-typescript-twoslash-queries":"0.0.50"},"_hasShrinkwrap":false,"devDependencies":{"@volar/kit":"~2.3.0-alpha.15","@types/node":"latest","@types/path-browserify":"latest","vscode-languageserver-protocol":"^3.17.5"},"_npmOperationalInternal":{"tmp":"tmp/language-service_2.0.21_1717858030751_0.25573281608428466","host":"s3://npm-registry-packages"},"readme":"# @vue/language-service\n\n<p>\n  <a href=\"https://www.npmjs.com/package/@vue/language-service\"><img src=\"https://img.shields.io/npm/v/@vue/language-service.svg?labelColor=18181B&color=1584FC\" alt=\"NPM version\"></a>\n  <a href=\"https://github.com/vuejs/language-tools/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/vuejs/language-tools.svg?labelColor=18181B&color=1584FC\" alt=\"License\"></a>\n</p>\n\nA 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.\n\n## Installation\n\n```bash\nnpm install @vue/language-service\n```\n\n## Usage\n\n```typescript\nimport { createVueLanguageServicePlugins } from '@vue/language-service';\nimport * as ts from 'typescript';\n\n// Create Vue language service plugins\n// The optional second argument `client` is used for communication with @vue/typescript-plugin\nconst plugins = createVueLanguageServicePlugins(ts);\n```\n\n## Built-in Plugins\n\n### General Language Services\n\n| Plugin | Source | Description |\n| :--- | :--- | :--- |\n| JSON | `volar-service-json` | JSON language service |\n| Pug Format | `volar-service-pug-beautify` | Pug formatting |\n| Emmet | `volar-service-emmet` | Emmet abbreviation expansion |\n| TypeScript Syntactic | `volar-service-typescript` | TypeScript syntactic features |\n| TypeScript Doc Comment | `volar-service-typescript` | JSDoc comment templates |\n\n### Vue-specific Plugins\n\n| Plugin | Description |\n| :--- | :--- |\n| `vue-sfc` | SFC structure support, including folding, symbols, document links |\n| `vue-template` | Template language service, supporting HTML and Pug |\n| `vue-format-per-block` | Formatting per block |\n| `vue-compiler-dom-errors` | Vue compiler error diagnostics |\n| `vue-directive-comments` | Directive comment support (`<!-- @vue-skip -->`, etc.) |\n| `vue-component-semantic-tokens` | Component semantic tokens |\n| `vue-inlayhints` | Inlay hints (destructured props, inline handlers, etc.) |\n| `vue-missing-props-hints` | Hints for missing required props |\n| `vue-autoinsert-dotvalue` | Auto-insertion of `.value` for ref variables |\n| `vue-autoinsert-space` | Auto-insertion of spaces in template interpolations |\n| `vue-scoped-class-links` | Scoped CSS class name links |\n| `vue-template-ref-links` | Template ref links |\n| `vue-extract-file` | Extract component refactoring |\n| `vue-document-drop` | Auto-generation of import on file drop |\n| `vue-document-highlights` | Document highlights |\n| `vue-suggest-define-assignment` | Assignment suggestions for `defineProps`, etc. |\n| `vue-twoslash-queries` | Twoslash query support (`// ^?`) |\n| `css` | CSS language service, supporting v-bind and CSS Modules |\n| `typescript-semantic-tokens` | TypeScript semantic tokens |\n\n## Usage with @volar/kit\n\nTo use the language service in a Node.js environment (e.g., for linting or testing):\n\n```typescript\nimport { createLanguage, createVueLanguagePlugin } from '@vue/language-core';\nimport { createLanguageService, createVueLanguageServicePlugins } from '@vue/language-service';\nimport ts from 'typescript';\n\nconst language = createLanguage([\n  createVueLanguagePlugin(ts, compilerOptions, vueCompilerOptions, asFileName),\n]);\n\nconst service = createLanguageService(\n  language,\n  createVueLanguageServicePlugins(ts),\n  env,\n);\n```\n\n## Related Packages\n\n- [`@vue/language-core`](../language-core) - Core module\n- [`@vue/language-server`](../language-server) - Language server\n- [`@volar/language-service`](https://github.com/volarjs/volar.js) - Volar.js base framework\n\n## License\n\n[MIT](https://github.com/vuejs/language-tools/blob/master/LICENSE) License\n","publish_time":1717858031049,"maintainers":[{"name":"johnsoncodehk","email":"johnsoncodehk@gmail.com"}],"_cnpm_publish_time":1717858031049,"dist-tags":{"alpha":"4.0.0-alpha.3","latest":"3.3.14","v3.0":"3.0.11"}}