config(nvim): overwrite publish diagnostics of ts-server from the ts-error-translate plugin
This commit is contained in:
1 parent
5193d3bd42
commit
04afd2e590
4 files changed
+32
-16
No files matched your search
@@ -10,7 +10,7 @@ return {
|
||||
{ "<leader>cen", "<cmd>FloatermNew --name=node --opener=edit --titleposition=center --wintype=split --height=0.35 node<CR>", desc = "Node" },
|
||||
{ "<leader>cep", "<cmd>FloatermNew --name=python --opener=edit --titleposition=center --wintype=split --height=0.35 python<CR>", desc = "Python" },
|
||||
{ "<leader>gf", function()
|
||||
local git_path = vim.fn.system("git ls-files --full-name " .. vim.api.nvim_buf_get_name(0))
|
||||
local git_path = vim.api.nvim_buf_get_name(0)
|
||||
vim.api.nvim_command("FloatermNew --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 lazygit -f " .. vim.trim(git_path))
|
||||
end, desc = "File History (LazyGit)" },
|
||||
{ "<S-Right>", "<Esc><Esc><cmd>FloatermNext<CR>", mode = { "t" }, desc = "Next Terminal" },
|
||||
|
||||
@@ -33,6 +33,7 @@ return {
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-ansible",
|
||||
ft = "yaml.ansible",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>tp", function() require("ansible").run() end, desc = "Run Ansible Playbooks" },
|
||||
|
||||
@@ -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 = {},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user