diff --git a/init.lua b/init.lua index 3437091..b2c9cdb 100644 --- a/init.lua +++ b/init.lua @@ -345,7 +345,6 @@ local on_attach = function(_, bufnr) ) vim.diagnostic.config({ float = { border = "single" } }) end - local servers = { -- clangd = {}, -- hls = {}, @@ -358,7 +357,7 @@ local servers = { html = { provideFormatter = false }, cssls = {}, pyright = {}, - tsserver = {}, + vtsls = {}, jdtls = { java = { @@ -409,10 +408,27 @@ mason_lspconfig.setup_handlers { local lspconfig = require("lspconfig") +local mason_registry = require('mason-registry') +local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() .. + '/node_modules/@vue/language-server' + +lspconfig.tsserver.setup { + init_options = { + plugins = { + { + name = '@vue/typescript-plugin', + location = vue_language_server_path, + languages = { 'vue' }, + }, + }, + }, + filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }, +} + lspconfig.volar.setup { init_options = { vue = { - hybridMode = false, + hybridMode = true, }, }, } diff --git a/lua/custom/plugins/nvim-ts-pairs.lua b/lua/custom/plugins/nvim-ts-pairs.lua new file mode 100644 index 0000000..4cbeffc --- /dev/null +++ b/lua/custom/plugins/nvim-ts-pairs.lua @@ -0,0 +1,6 @@ +return { + "yorickpeterse/nvim-tree-pairs", + config = function() + require('tree-pairs').setup() + end +}