all repos

dotfiles @ c1cc0c9ebe9484bf94fa96618ae24fbeda964d58

my dotfiles

config/nvim/lua/tsserver.lua (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require('lspconfig').typescript.setup({
    handlers = {
        ["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config)
            if params.diagnostics ~= nil then
                local idx = 1
                while idx <= #params.diagnostics do
                    if params.diagnostics[idx].code == 80001 then
                        table.remove(params.diagnostics, idx)
                    else
                        idx = idx + 1
                    end
                end
            end
            vim.lsp.diagnostics.on_publish_diagnostics(_, _, params, client_id, _, config)
        end,
    },
})