From 4b0f720457fbbf624406a540b42e9ad7f2e50a77 Mon Sep 17 00:00:00 2001 From: Ray Guo Date: Sat, 6 Jul 2024 00:12:04 +1000 Subject: [PATCH] feat(vue): enabled hybrid mode to avoid 2 typescript lsp running at same time (#3908) ## What is this PR for? At the moment, the config for vue set hybrid mode to `false` which volar will run a typescript server under the hook. ( hybrid mode false is the takeover mode in v1, was introduced in `2.0.7` see more information here: https://github.com/vuejs/language-tools/pull/4119 ). However, another vtsls with vue language plugin also attached to vue files, this will cause two typescript server running at the same time. It can be very easily observed with tools like `htop` volar and vtsls will have similar memory usage which is abnormal because volar should be very light by itself. This will introduce issues like duplicate diagnostics, see https://github.com/vuejs/language-tools/issues/4159#issuecomment-2208101079 In this pull request, I set the hybrid mode to true as default because the hybrid mode is the "correct" way moving forward, thus it would be more stable. Let me know if you feel it should stay as `false` to be default. ## Does this PR fix an existing issue? No existing issue. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/vue.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/vue.lua b/lua/lazyvim/plugins/extras/lang/vue.lua index cd2fe4f1..088ce6a9 100644 --- a/lua/lazyvim/plugins/extras/lang/vue.lua +++ b/lua/lazyvim/plugins/extras/lang/vue.lua @@ -22,7 +22,7 @@ return { volar = { init_options = { vue = { - hybridMode = false, + hybridMode = true, }, }, },