Skip to content

Commit 12ce781

Browse files
docs(v2): Change "volar" to "vue_ls" in all examples (#5407)
1 parent a36635f commit 12ce781

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
[neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) ⚡ 🤝 \
2828
*Vue language server configuration for Neovim*
29-
3029
<details>
3130
<summary>How to configure vue language server with neovim and lsp?</summary>
3231

@@ -38,8 +37,13 @@ Note: The "Take Over" mode has been discontinued. Instead, a new "Hybrid" mode h
3837
3938
```lua
4039
-- If you are using mason.nvim, you can get the ts_plugin_path like this
40+
-- For Mason v1,
4141
-- local mason_registry = require('mason-registry')
4242
-- local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() .. '/node_modules/@vue/language-server'
43+
-- For Mason v2,
44+
-- local vue_language_server_path = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server'
45+
-- or even
46+
-- local vue_language_server_path = vim.fn.stdpath('data') .. '/mason/packages/vue-language-server/node_modules/@vue/language-server'
4347

4448
local vue_language_server_path = '/path/to/@vue/language-server'
4549

@@ -59,23 +63,23 @@ lspconfig.ts_ls.setup {
5963
}
6064

6165
-- No need to set `hybridMode` to `true` as it's the default value
62-
lspconfig.volar.setup {}
66+
lspconfig.vue_ls.setup {}
6367
```
6468

65-
### Non-Hybrid mode(similar to takeover mode) configuration (Requires `@vue/language-server` version `^2.0.7`)
69+
### Non-Hybrid mode (similar to takeover mode) configuration (Requires `@vue/language-server` version `^2.0.7`)
6670

67-
Note: If `hybridMode` is set to `false` `Volar` will run embedded `ts_ls` therefore there is no need to run it separately.
71+
Note: If `hybridMode` is set to `false`, `vue_ls` will run embedded `ts_ls` therefore there is no need to run it separately.
6872

6973
For more information see [#4119](https://github.com/vuejs/language-tools/pull/4119)
7074

71-
*Make sure you have typescript installed globally or pass the location to volar*
75+
*Make sure you have TypeScript installed globally or pass the location to vue_ls*
7276

73-
Use volar for all `.{vue,js,ts,tsx,jsx}` files.
77+
Use `vue_ls` for all `.{vue,js,ts,tsx,jsx}` files.
7478
```lua
7579
local lspconfig = require('lspconfig')
7680

7781
-- lspconfig.ts_ls.setup {}
78-
lspconfig.volar.setup {
82+
lspconfig.vue_ls.setup {
7983
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
8084
init_options = {
8185
vue = {
@@ -85,7 +89,7 @@ lspconfig.volar.setup {
8589
}
8690
```
8791

88-
Use `volar` for only `.vue` files and `ts_ls` for `.ts` and `.js` files.
92+
Use `vue_ls` for only `.vue` files and `ts_ls` for `.ts` and `.js` files.
8993
```lua
9094
local lspconfig = require('lspconfig')
9195

@@ -101,7 +105,7 @@ lspconfig.ts_ls.setup {
101105
},
102106
}
103107

104-
lspconfig.volar.setup {
108+
lspconfig.vue_ls.setup {
105109
init_options = {
106110
vue = {
107111
hybridMode = false,

0 commit comments

Comments
 (0)