changeset 612:f6e88e1bfe13

use simple quickfix on clicking diagnostic info
author zegervdv <zegervdv@me.com>
date Thu, 21 Jul 2022 15:04:39 +0200
parents a879f63773a2
children c79b392e7919
files .chezmoitemplates/init.lua
diffstat 1 files changed, 4 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/.chezmoitemplates/init.lua	Wed Jul 20 10:49:39 2022 +0200
+++ b/.chezmoitemplates/init.lua	Thu Jul 21 15:04:39 2022 +0200
@@ -391,23 +391,6 @@
   }
   use { 'folke/lua-dev.nvim' }
   use {
-    'folke/trouble.nvim',
-    config = function()
-      require('trouble').setup {
-        icons = false,
-        fold_open = 'v',
-        fold_closed = '>',
-        signs = {
-          error = 'error',
-          warning = 'warn',
-          hint = 'hint',
-          information = 'info',
-        },
-        use_diagnostic_signs = true,
-      }
-    end,
-  }
-  use {
     'smjonas/inc-rename.nvim',
     config = function()
       require('inc_rename').setup {
@@ -527,7 +510,10 @@
         },
         hl = { fg = 'diag_warn' },
         on_click = {
-          callback = function() require('trouble').toggle { mode = 'document_diagnostics' } end,
+          callback = function()
+            vim.diagnostic.setqflist { severity = vim.diagnostic.severity.WARN }
+            vim.cmd [[ botright copen ]]
+          end,
           name = 'heirline_diagnostics',
         },
       }