Mercurial > dotfiles
comparison .chezmoitemplates/init.lua @ 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 |
comparison
equal
deleted
inserted
replaced
611:a879f63773a2 | 612:f6e88e1bfe13 |
---|---|
389 'lukas-reineke/lsp-format.nvim', | 389 'lukas-reineke/lsp-format.nvim', |
390 config = function() require('lsp-format').setup {} end, | 390 config = function() require('lsp-format').setup {} end, |
391 } | 391 } |
392 use { 'folke/lua-dev.nvim' } | 392 use { 'folke/lua-dev.nvim' } |
393 use { | 393 use { |
394 'folke/trouble.nvim', | |
395 config = function() | |
396 require('trouble').setup { | |
397 icons = false, | |
398 fold_open = 'v', | |
399 fold_closed = '>', | |
400 signs = { | |
401 error = 'error', | |
402 warning = 'warn', | |
403 hint = 'hint', | |
404 information = 'info', | |
405 }, | |
406 use_diagnostic_signs = true, | |
407 } | |
408 end, | |
409 } | |
410 use { | |
411 'smjonas/inc-rename.nvim', | 394 'smjonas/inc-rename.nvim', |
412 config = function() | 395 config = function() |
413 require('inc_rename').setup { | 396 require('inc_rename').setup { |
414 post_hook = function(result) | 397 post_hook = function(result) |
415 local changed = {} | 398 local changed = {} |
525 { | 508 { |
526 provider = function(self) return self.warnings > 0 and self.warnings .. ' ' end, | 509 provider = function(self) return self.warnings > 0 and self.warnings .. ' ' end, |
527 }, | 510 }, |
528 hl = { fg = 'diag_warn' }, | 511 hl = { fg = 'diag_warn' }, |
529 on_click = { | 512 on_click = { |
530 callback = function() require('trouble').toggle { mode = 'document_diagnostics' } end, | 513 callback = function() |
514 vim.diagnostic.setqflist { severity = vim.diagnostic.severity.WARN } | |
515 vim.cmd [[ botright copen ]] | |
516 end, | |
531 name = 'heirline_diagnostics', | 517 name = 'heirline_diagnostics', |
532 }, | 518 }, |
533 } | 519 } |
534 | 520 |
535 local statusline_default = { lbound, FileNameBlock, align, Diagnostics, Lsp, space, Ruler, rbound } | 521 local statusline_default = { lbound, FileNameBlock, align, Diagnostics, Lsp, space, Ruler, rbound } |