@vue/language-server 3.2.4 → 3.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +84 -0
  2. package/package.json +7 -7
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # @vue/language-server
2
+
3
+ <p>
4
+ <a href="https://www.npmjs.com/package/@vue/language-server"><img src="https://img.shields.io/npm/v/@vue/language-server.svg?labelColor=18181B&color=1584FC" alt="NPM version"></a>
5
+ <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>
6
+ </p>
7
+
8
+ A Vue language server based on the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). This package provides an executable language server that can be integrated with any LSP-compatible editor.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @vue/language-server
14
+ ```
15
+
16
+ ## Command-Line Usage
17
+
18
+ After installation, the `vue-language-server` command is available:
19
+
20
+ ```bash
21
+ # Start in stdio mode
22
+ vue-language-server --stdio
23
+
24
+ # Check version
25
+ vue-language-server --version
26
+
27
+ # Specify TypeScript SDK path
28
+ vue-language-server --stdio --tsdk=/path/to/typescript/lib
29
+ ```
30
+
31
+ ### `--tsdk` Parameter
32
+
33
+ The `--tsdk` parameter is used to specify the path to the TypeScript SDK. This is useful when you need to use a specific version of TypeScript from your project instead of the globally installed version. The path should point to TypeScript's `lib` directory.
34
+
35
+ ## Editor Integration
36
+
37
+ ### VSCode
38
+
39
+ Simply install the [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) extension, which already includes this language server.
40
+
41
+ ### Neovim
42
+
43
+ Configure via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig):
44
+
45
+ ```lua
46
+ require('lspconfig').volar.setup({})
47
+ ```
48
+
49
+ ### Sublime Text
50
+
51
+ See [sublimelsp/LSP-volar](https://github.com/sublimelsp/LSP-volar).
52
+
53
+ ### Emacs
54
+
55
+ See [lsp-mode](https://github.com/emacs-lsp/lsp-mode) for Vue support.
56
+
57
+ ## Programmatic Usage
58
+
59
+ If you need to start the language server within your own program:
60
+
61
+ ```typescript
62
+ import { startServer } from '@vue/language-server/lib/server';
63
+ import * as ts from 'typescript';
64
+
65
+ // startServer creates an LSP connection and starts listening
66
+ // Requires communication with the client via stdio or other means
67
+ startServer(ts);
68
+ ```
69
+
70
+ > **Note**: `startServer` creates a stdio-based LSP connection and communicates with `@vue/typescript-plugin` through `tsserver/request` and `tsserver/response` notifications.
71
+
72
+ ## Collaboration with TypeScript Plugin
73
+
74
+ This language server communicates with `@vue/typescript-plugin` through custom `tsserver/request` and `tsserver/response` notifications. This architecture allows the language server to leverage the capabilities of the TypeScript language service for complex type inference and code analysis.
75
+
76
+ ## Related Packages
77
+
78
+ - [`@vue/language-core`](../language-core) - Core module
79
+ - [`@vue/language-service`](../language-service) - Language service plugins
80
+ - [`@vue/typescript-plugin`](../typescript-plugin) - TypeScript plugin
81
+
82
+ ## License
83
+
84
+ [MIT](https://github.com/vuejs/language-tools/blob/master/LICENSE) License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/language-server",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -16,10 +16,10 @@
16
16
  "directory": "packages/language-server"
17
17
  },
18
18
  "dependencies": {
19
- "@volar/language-server": "2.4.27",
20
- "@vue/language-core": "3.2.4",
21
- "@vue/language-service": "3.2.4",
22
- "@vue/typescript-plugin": "3.2.4",
19
+ "@volar/language-server": "2.4.28",
20
+ "@vue/language-core": "3.2.6",
21
+ "@vue/language-service": "3.2.6",
22
+ "@vue/typescript-plugin": "3.2.6",
23
23
  "vscode-uri": "^3.0.8"
24
24
  },
25
25
  "peerDependencies": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@typescript/server-harness": "latest",
30
- "@volar/test-utils": "2.4.27"
30
+ "@volar/test-utils": "2.4.28"
31
31
  },
32
- "gitHead": "f0ede303fadb192a59068b4b667b0405523d24c8"
32
+ "gitHead": "94907be4f056f25867e46a117ab18d2782b425d7"
33
33
  }