comparison .chezmoitemplates/init.lua @ 641:18a279ecde89

Set diagnostics for current buffer only in quickfix list
author zegervdv <zegervdv@me.com>
date Mon, 22 Aug 2022 13:37:20 +0200
parents 1637824c8eb0
children fddc9726f457
comparison
equal deleted inserted replaced
640:1637824c8eb0 641:18a279ecde89
553 provider = function(self) return self.warnings > 0 and self.warnings .. ' ' end, 553 provider = function(self) return self.warnings > 0 and self.warnings .. ' ' end,
554 }, 554 },
555 hl = { fg = 'diag_warn' }, 555 hl = { fg = 'diag_warn' },
556 on_click = { 556 on_click = {
557 callback = function() 557 callback = function()
558 vim.diagnostic.setqflist { severity = { min = vim.diagnostic.severity.WARN } } 558 local diagnostics = vim.diagnostic.get(0, { severity = { min = vim.diagnostic.severity.WARN } })
559 vim.fn.setqflist(vim.diagnostic.toqflist(diagnostics))
559 vim.cmd.copen { mods = { split = 'botright' } } 560 vim.cmd.copen { mods = { split = 'botright' } }
560 end, 561 end,
561 name = 'heirline_diagnostics', 562 name = 'heirline_diagnostics',
562 }, 563 },
563 } 564 }