We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0515f98 commit fbc8a24Copy full SHA for fbc8a24
init.lua
@@ -738,6 +738,15 @@ require('lazy').setup({
738
end,
739
})
740
741
+ -- Override diagnostic handler to prevent URI errors
742
+ local default_diagnostic_handler = vim.lsp.handlers['textDocument/publishDiagnostics']
743
+ vim.lsp.handlers['textDocument/publishDiagnostics'] = function(err, result, ctx, config)
744
+ -- Filter out diagnostics with invalid URIs
745
+ if result and result.uri and type(result.uri) == 'string' and result.uri ~= '' then
746
+ return default_diagnostic_handler(err, result, ctx, config)
747
+ end
748
749
+
750
-- Diagnostic Config
751
-- See :help vim.diagnostic.Opts
752
vim.diagnostic.config {
0 commit comments