nvim: Add vue language LSP/Treesitter/formatting setup
This commit is contained in:
parent
1f05e0775d
commit
e912c3f535
2 changed files with 22 additions and 2 deletions
|
|
@ -117,7 +117,11 @@ local languages = {
|
|||
lsp = { tinymist = { settings = { formatterMode = "typstyle" } } },
|
||||
ts = { "typst" },
|
||||
},
|
||||
vue = { format = { vue = { "prettier", "rustywind" } } },
|
||||
vue = {
|
||||
lsp = { vue_ls = {} },
|
||||
ts = { "typescript", "vue" },
|
||||
format = { vue = { "prettier", "rustywind" } },
|
||||
},
|
||||
yaml = { lsp = { yamlls = {}, ansiblels = {} }, ts = { "yaml" }, format = { yaml = { "prettier" } } },
|
||||
zsh = { format = { zsh = { "shfmt" } } },
|
||||
|
||||
|
|
@ -368,7 +372,6 @@ local languages = {
|
|||
"vim",
|
||||
"vimdoc",
|
||||
"vrl",
|
||||
"vue",
|
||||
"wgsl",
|
||||
"wgsl_bevy",
|
||||
"wing",
|
||||
|
|
|
|||
|
|
@ -160,6 +160,23 @@ local lsp = {
|
|||
})
|
||||
end
|
||||
|
||||
if vim.lsp.is_enabled("vue_ls") then
|
||||
register("ts_ls", {
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = vim.fn.expand("$MASON/packages")
|
||||
.. "/vue-language-server"
|
||||
.. "/node_modules/@vue/language-server",
|
||||
languages = { "vue" },
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptsreact", "vue" },
|
||||
})
|
||||
end
|
||||
|
||||
-- attach ltex for fitting ft only when spell checking becomes enabled
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "SpellEnable",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue