1.4 KiB
1.4 KiB
Neovim Vue Language Server Design
Goal
Add current Vue 3 language-server support without changing language-server behavior in non-Vue JavaScript and TypeScript projects.
Design
- Keep
ts_lsenabled for JavaScript and TypeScript files. - Enable
vue_lsfor Vue single-file components. - Use nvim-lspconfig's current
vue_lsconfiguration and its built-in request forwarding tots_ls. - Let Mason install the
vue-language-serverpackage through the existing automatic-installation integration. - Extend the local Mason health check so Vue's runtime requirement and executable are visible.
- Do not reproduce the tutorial's Volar Take Over Mode because Vue Language Server 3 removed it.
- Do not add Tailwind support in this change.
Files
- Update
nvim/lua/tracer/plugins/lspconfig.luato enablevue_ls. - Update
nvim/lua/mason/health.luato mention Vue Language Server and checkvue-language-server.
Verification
- Confirm the pre-change check fails because
vue_lsis not enabled. - Confirm Neovim starts headlessly without configuration errors after the change.
- Confirm
vue_lsappears in Neovim's enabled LSP configurations. - Confirm Mason installs
vue-language-serverand its executable is available. - Preserve the existing
ts_lsconfiguration for non-Vue projects.
Constraints
- Preserve unrelated working-tree changes.
- Use the Neovim 0.12
vim.lsp.enable()API already used by this configuration.