From f97a4abbf8ad66e2ea49312816ca8708ec49cf70 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 4 Apr 2024 13:35:55 -0400 Subject: [PATCH] feat(ts-error-translator-nvim): `astro` and `svelte` support added --- .../lsp/ts-error-translator-nvim/init.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lua/astrocommunity/lsp/ts-error-translator-nvim/init.lua b/lua/astrocommunity/lsp/ts-error-translator-nvim/init.lua index 7c819f7ce..230d8418f 100644 --- a/lua/astrocommunity/lsp/ts-error-translator-nvim/init.lua +++ b/lua/astrocommunity/lsp/ts-error-translator-nvim/init.lua @@ -11,7 +11,17 @@ return { local orig = opts.lsp_handlers[event] or vim.lsp.handlers[event] opts.lsp_handlers[event] = function(err, result, ctx, config) local client = vim.lsp.get_client_by_id(ctx.client_id) - if client and vim.tbl_contains({ "tsserver", "vtsls", "typescript-tools", "volar" }, client.name) then + if + client + and vim.tbl_contains({ + "astro", + "svelte", + "tsserver", + "typescript-tools", + "volar", + "vtsls", + }, client.name) + then vim.tbl_map(require("ts-error-translator").translate, result.diagnostics) end orig(err, result, ctx, config)