add vue lsp
This commit is contained in:
@@ -83,6 +83,20 @@ return {
|
|||||||
on_attach = lsp_attach
|
on_attach = lsp_attach
|
||||||
})
|
})
|
||||||
vim.lsp.config('ts_ls', {
|
vim.lsp.config('ts_ls', {
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = lsp_attach,
|
||||||
|
filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact", "javascript.jsx", "typescript.tsx", "vue" },
|
||||||
|
init_options = {
|
||||||
|
plugins = { {
|
||||||
|
name = '@vue/typescript-plugin',
|
||||||
|
location = vim.fn.expand(vim.fn.stdpath "data" ..
|
||||||
|
"/mason/packages/vue-language-server/node_modules/@vue/language-server"),
|
||||||
|
languages = { 'vue' },
|
||||||
|
configNamespace = 'typescript'
|
||||||
|
} }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
vim.lsp.config('vue_ls', {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = lsp_attach
|
on_attach = lsp_attach
|
||||||
})
|
})
|
||||||
@@ -131,7 +145,7 @@ return {
|
|||||||
on_attach = lsp_attach
|
on_attach = lsp_attach
|
||||||
})
|
})
|
||||||
vim.lsp.config('emmet_ls', {
|
vim.lsp.config('emmet_ls', {
|
||||||
filetypes = { "css", "html", "javascript", "typescript" },
|
filetypes = { "css", "html" },
|
||||||
-- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration).
|
-- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration).
|
||||||
-- **Note:** only the options listed in the table are supported.
|
-- **Note:** only the options listed in the table are supported.
|
||||||
init_options = {
|
init_options = {
|
||||||
@@ -161,8 +175,9 @@ return {
|
|||||||
-- })
|
-- })
|
||||||
vim.lsp.config('clangd', {
|
vim.lsp.config('clangd', {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = lsp_attach,
|
on_attach = lsp_attach
|
||||||
})
|
})
|
||||||
|
vim.lsp.enable({ 'ts_ls', 'vue_ls', 'clangd' })
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user