nvim: Move typescript and vue LSP config into lsp dir
This commit is contained in:
parent
bb6f401ff3
commit
99098f56a1
2 changed files with 17 additions and 17 deletions
17
nvim/.config/nvim/after/lsp/vue_ls.lua
Normal file
17
nvim/.config/nvim/after/lsp/vue_ls.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- we have to set up ts server with an additional vue plugin
|
||||
vim.lsp.config("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" },
|
||||
})
|
||||
|
||||
return {}
|
||||
|
|
@ -142,23 +142,6 @@ local lsp = {
|
|||
register("arduino_language_server")
|
||||
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