From e7c64767153a6dc05473d656e51a94a744b31028 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Sat, 7 Sep 2024 11:51:09 -0700 Subject: [PATCH] :wrench: Updates to lsp for typescript --- .config/nvim/after/plugin/lsp.lua | 52 ++++++++++++++----------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 725e6bda..38b01cb5 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -6,9 +6,8 @@ require("mason").setup() lsp.ensure_installed({ "clangd", - "tsserver", "eslint", - -- "rust_analyzer", + "rust_analyzer", "volar", }) @@ -71,40 +70,37 @@ require("mason-lspconfig").setup_handlers({ function(server_name) local server_config = {} if server_name == "volar" then - server_config.filetypes = { "vue", "typescript", "javascript" } - lspconfig.tsserver.setup({ - ["disabled"] = true, - }) + server_config.filetypes = { "vue", "ts_ls", "javascript" } lspconfig.volar.setup({ settings = { ["volar.takeOverMode.enabled"] = true, }, }) - lspconfig.rust_analyzer.setup({ - settings = { - ["rust-analyzer"] = { - -- procMacro = { - -- ignored = { - -- leptos_macro = { - -- "server", - -- }, - -- }, - -- }, - -- rustfmt = { - -- overrideCommand = { - -- "leptosfmt", - -- "--stdin", - -- "--rustfmt", - -- }, - -- edition = { "2021" }, - -- }, - cargo = { - allFeatures = true, + end + lspconfig.rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + procMacro = { + ignored = { + leptos_macro = { + "server", + }, }, }, + rustfmt = { + overrideCommand = { + "leptosfmt", + "--stdin", + "--rustfmt", + }, + edition = { "2021" }, + }, + cargo = { + allFeatures = true, + }, }, - }) - end + }, + }) lspconfig[server_name].setup(server_config) end, })