Skip to content

feat(vue): enabled hybrid mode to avoid 2 typescript lsp running at same time#3908

Merged
folke merged 3 commits intoLazyVim:mainfrom
RayGuo-ergou:hotfix/vue_lsp_perf_issue
Jul 5, 2024
Merged

feat(vue): enabled hybrid mode to avoid 2 typescript lsp running at same time#3908
folke merged 3 commits intoLazyVim:mainfrom
RayGuo-ergou:hotfix/vue_lsp_perf_issue

Conversation

@RayGuo-ergou
Copy link
Copy Markdown
Contributor

@RayGuo-ergou RayGuo-ergou commented Jul 4, 2024

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: vuejs/language-tools#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 vuejs/language-tools#4159 (comment)

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

@folke
Copy link
Copy Markdown
Collaborator

folke commented Jul 4, 2024

if hybrid mode is the way to go, then this should be configured to just that. ty

@iamxiaojianzheng
Copy link
Copy Markdown
Contributor

iamxiaojianzheng commented Jul 5, 2024

Expect to see that in the next release. @folke 🙂

@folke
Copy link
Copy Markdown
Collaborator

folke commented Jul 5, 2024

@RayGuo-ergou can you update the PR to always use hybrid mode? It does not need to be configurable.

@RayGuo-ergou
Copy link
Copy Markdown
Contributor Author

Hi @folke done!

@RayGuo-ergou RayGuo-ergou changed the title perf(vue): fix duplicated typescript server for vue files feat(vue): enabled hybrid mode to avoid 2 typescript lsp running at same time Jul 5, 2024
@RayGuo-ergou RayGuo-ergou changed the title feat(vue): enabled hybrid mode to avoid 2 typescript lsp running at same time feat(vue): enabled hybrid mode to avoid 2 typescript lsp running at same time Jul 5, 2024
@folke folke merged commit 4b0f720 into LazyVim:main Jul 5, 2024
@folke
Copy link
Copy Markdown
Collaborator

folke commented Jul 5, 2024

ty!

folke pushed a commit that referenced this pull request Jul 5, 2024
🤖 I have created a release *beep* *boop*
---


##
[12.26.0](v12.25.0...v12.26.0)
(2024-07-05)


### Features

* **dial:** yaml support
([f64bbd2](f64bbd2))
* **util:** rest-client
([#3915](#3915))
([76b41cd](76b41cd))
* **vue:** enabled hybrid mode to avoid 2 typescript lsp running at same
time ([#3908](#3908))
([4b0f720](4b0f720))


### Bug Fixes

* **dial:** move date related augends to default group
([#3927](#3927))
([4192d95](4192d95))
* **outline:** use the correct symbols and filter config format
([#3924](#3924))
([502dac1](502dac1))
* **project:** properly close window after changing directory
([#3919](#3919))
([51e99df](51e99df))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants