VueJs

Installing LSP
you have 2 options:
-
:LspInstall vuels -
:LspInstall volar
Volar
If you are using Volar you have to install in your Vue project the following library:
pnpm install -D @vue/typescript-pluginyarn add -D @vue/typescript-pluginnpm install -D @vue/typescript-plugin
Installing Formatter
:MasonInstall prettier
If mason is not supported on your platform
Setup LSP
go to: ~/.config/nvim/lua/userconfig/lsp.lua
and add these lines
lsp.lua
require('lspconfig')['vuels'].setup {
capabilities = capabilities,
on_attach = on_attach
}or
lsp.lua
require('lspconfig')['volar'].setup {
capabilities = capabilities,
on_attach = on_attach
}Formatter
If lsp does not provide a formatter, you can use the following command: :Neoformat click here (opens in a new tab) for more information