aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/tsserver.lua
diff options
context:
space:
mode:
authorHugo <hugo@whynothugo.nl>2024-03-05 07:13:18 +0100
committerGitHub <noreply@github.com>2024-03-05 14:13:18 +0800
commitc9f387fab1d09ed59d877a08a05d283195df95e7 (patch)
tree0a1a0ccd5d05bd3f86c69258f77a1d0150845880 /lua/lspconfig/server_configurations/tsserver.lua
parentfix: update lua types to match latest nightly (#3048) (diff)
downloadnvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.tar
nvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.tar.gz
nvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.tar.bz2
nvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.tar.lz
nvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.tar.xz
nvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.tar.zst
nvim-lspconfig-c9f387fab1d09ed59d877a08a05d283195df95e7.zip
docs: update documentation for Volar >= 2.0.0 (#3049)
See: https://github.com/vuejs/language-tools/issues/3925
Diffstat (limited to 'lua/lspconfig/server_configurations/tsserver.lua')
-rw-r--r--lua/lspconfig/server_configurations/tsserver.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/tsserver.lua b/lua/lspconfig/server_configurations/tsserver.lua
index 735889b3..347b15d7 100644
--- a/lua/lspconfig/server_configurations/tsserver.lua
+++ b/lua/lspconfig/server_configurations/tsserver.lua
@@ -43,6 +43,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.
]],
default_config = {
root_dir = [[root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git")]],