config(nvim): overwrite publish diagnostics of ts-server from the ts-error-translate plugin

This commit is contained in:
sankalp committed 2024-03-16 14:00:02 +05:45
1 parent 5193d3bd42
commit 04afd2e590
4 files changed
+32 -16

No files matched your search

@@ -140,6 +140,21 @@ return {
{
"dmmulroy/ts-error-translator.nvim",
ft = { "typescript", "typescriptreact" },
dependencies = {
"neovim/nvim-lspconfig",
opts = {
servers = {
tsserver = {
handlers = {
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
require("ts-error-translator").translate_diagnostics(err, result, ctx, config)
vim.lsp.diagnostic.on_publish_diagnostics(err, result, ctx, config)
end,
},
},
},
},
},
opts = {},
},
{