lspconfig: fix vue lsp
This commit is contained in:
parent
49015143c5
commit
e02b5d9e03
1 changed files with 15 additions and 1 deletions
|
@ -3,6 +3,8 @@ return {
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
local mason_registry = require("mason-registry")
|
||||||
|
local volar_path = mason_registry.get_package("vue-language-server"):get_install_path() .. "/node_modules/@vue/language-server"
|
||||||
|
|
||||||
lspconfig.clangd.setup({
|
lspconfig.clangd.setup({
|
||||||
cmd = { "clangd", "-header-insertion=never" },
|
cmd = { "clangd", "-header-insertion=never" },
|
||||||
|
@ -13,7 +15,19 @@ return {
|
||||||
lspconfig.sqlls.setup({})
|
lspconfig.sqlls.setup({})
|
||||||
lspconfig.svlangserver.setup({})
|
lspconfig.svlangserver.setup({})
|
||||||
lspconfig.texlab.setup({})
|
lspconfig.texlab.setup({})
|
||||||
lspconfig.ts_ls.setup({})
|
|
||||||
|
lspconfig.ts_ls.setup({
|
||||||
|
init_options = {
|
||||||
|
plugins = {
|
||||||
|
{
|
||||||
|
name = "@vue/typescript-plugin",
|
||||||
|
location = vue_language_server_path,
|
||||||
|
languages = { "vue" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
|
||||||
|
})
|
||||||
lspconfig.volar.setup({})
|
lspconfig.volar.setup({})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue