aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-03-05 06:13:33 +0000
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-03-05 06:13:33 +0000
commit534a255b6bf1bba2baa04da15ac529976854267a (patch)
tree141639a4dfb2c11906f2af5c132d41ae02ef5cb6
parentdocs: update documentation for Volar >= 2.0.0 (#3049) (diff)
downloadnvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.tar
nvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.tar.gz
nvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.tar.bz2
nvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.tar.lz
nvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.tar.xz
nvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.tar.zst
nvim-lspconfig-534a255b6bf1bba2baa04da15ac529976854267a.zip
docs: update server_configurations.md
skip-checks: true
-rw-r--r--doc/server_configurations.md38
-rw-r--r--doc/server_configurations.txt38
2 files changed, 74 insertions, 2 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md
index 48ce4154..a0b3318d 100644
--- a/doc/server_configurations.md
+++ b/doc/server_configurations.md
@@ -11540,6 +11540,37 @@ Here's an example that disables type checking in JavaScript files.
}
```
+# Vue support
+
+As of 2.0.0, Volar no longer supports TypeScript itself. Instead, a plugin adds
+adds Vue support to this language server.
+
+```lua
+require'lspconfig'.tsserver.setup{
+ init_options = {
+ plugins = {
+ {
+ name = "@vue/typescript-plugin",
+ location = "/usr/local/lib/node_modules/@vue/typescript-plugin",
+ languages = {"javascript", "typescript", "vue"},
+ },
+ },
+ },
+ filetypes = {
+ "javascript",
+ "typescript",
+ "vue",
+ },
+}
+```
+
+`location` MUST be defined. If the plugin is installed in `node_modules`,
+`location` can have any value.
+
+`languages` must include `vue` even if it is listed in `filetypes`.
+
+`filetypes` is extended here to include Vue SFC.
+
**Snippet to enable the language server:**
@@ -12378,9 +12409,14 @@ npm install -g @vue/language-server
Volar by default supports Vue 3 projects. Vue 2 projects need
[additional configuration](https://github.com/vuejs/language-tools/tree/master/packages/vscode-vue#usage).
+**TypeScript support**
+As of release 2.0.0, Volar no longer wraps around tsserver. For typescript
+support, `tsserver` needs to be configured with the `@vue/typescript-plugin`
+plugin.
+
**Take Over Mode**
-Volar can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471).
+Volar (prior to 2.0.0), can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471).
To enable Take Over Mode, override the default filetypes in `setup{}` as follows:
diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt
index 48ce4154..a0b3318d 100644
--- a/doc/server_configurations.txt
+++ b/doc/server_configurations.txt
@@ -11540,6 +11540,37 @@ Here's an example that disables type checking in JavaScript files.
}
```
+# Vue support
+
+As of 2.0.0, Volar no longer supports TypeScript itself. Instead, a plugin adds
+adds Vue support to this language server.
+
+```lua
+require'lspconfig'.tsserver.setup{
+ init_options = {
+ plugins = {
+ {
+ name = "@vue/typescript-plugin",
+ location = "/usr/local/lib/node_modules/@vue/typescript-plugin",
+ languages = {"javascript", "typescript", "vue"},
+ },
+ },
+ },
+ filetypes = {
+ "javascript",
+ "typescript",
+ "vue",
+ },
+}
+```
+
+`location` MUST be defined. If the plugin is installed in `node_modules`,
+`location` can have any value.
+
+`languages` must include `vue` even if it is listed in `filetypes`.
+
+`filetypes` is extended here to include Vue SFC.
+
**Snippet to enable the language server:**
@@ -12378,9 +12409,14 @@ npm install -g @vue/language-server
Volar by default supports Vue 3 projects. Vue 2 projects need
[additional configuration](https://github.com/vuejs/language-tools/tree/master/packages/vscode-vue#usage).
+**TypeScript support**
+As of release 2.0.0, Volar no longer wraps around tsserver. For typescript
+support, `tsserver` needs to be configured with the `@vue/typescript-plugin`
+plugin.
+
**Take Over Mode**
-Volar can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471).
+Volar (prior to 2.0.0), can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471).
To enable Take Over Mode, override the default filetypes in `setup{}` as follows: