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" } } },
|
lsp = { tinymist = { settings = { formatterMode = "typstyle" } } },
|
||||||
ts = { "typst" },
|
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" } } },
|
yaml = { lsp = { yamlls = {}, ansiblels = {} }, ts = { "yaml" }, format = { yaml = { "prettier" } } },
|
||||||
zsh = { format = { zsh = { "shfmt" } } },
|
zsh = { format = { zsh = { "shfmt" } } },
|
||||||
|
|
||||||
|
|
@ -368,7 +372,6 @@ local languages = {
|
||||||
"vim",
|
"vim",
|
||||||
"vimdoc",
|
"vimdoc",
|
||||||
"vrl",
|
"vrl",
|
||||||
"vue",
|
|
||||||
"wgsl",
|
"wgsl",
|
||||||
"wgsl_bevy",
|
"wgsl_bevy",
|
||||||
"wing",
|
"wing",
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,23 @@ local lsp = {
|
||||||
})
|
})
|
||||||
end
|
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
|
-- attach ltex for fitting ft only when spell checking becomes enabled
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "SpellEnable",
|
pattern = "SpellEnable",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue