Set up better linting and quickfix

This commit is contained in:
Levente Krizsán 2024-09-01 11:42:12 +02:00
parent a4addb63da
commit 17450661d3
2 changed files with 38 additions and 5 deletions

View File

@ -0,0 +1,38 @@
-- https://github.com/folke/trouble.nvim
return {
'folke/trouble.nvim',
opts = {},
cmd = 'Trouble',
keys = {
{
'<leader>xx',
'<cmd>Trouble diagnostics toggle<cr>',
desc = 'Diagnostics (Trouble)',
},
{
'<leader>xX',
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
desc = 'Buffer Diagnostics (Trouble)',
},
{
'<leader>xs',
'<cmd>Trouble symbols toggle focus=false<cr>',
desc = 'Symbols (Trouble)',
},
{
'<leader>xl',
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
desc = 'LSP Definitions / references / ... (Trouble)',
},
{
'<leader>xL',
'<cmd>Trouble loclist toggle<cr>',
desc = 'Location List (Trouble)',
},
{
'<leader>xQ',
'<cmd>Trouble qflist toggle<cr>',
desc = 'Quickfix List (Trouble)',
},
},
}

View File

@ -7,11 +7,6 @@ return {
local lint = require 'lint' local lint = require 'lint'
lint.linters_by_ft = { lint.linters_by_ft = {
markdown = { 'markdownlint' }, markdown = { 'markdownlint' },
javascript = { 'eslint' },
typescript = { 'eslint' },
javascriptreact = { 'eslint' },
typescriptreact = { 'eslint' },
rust = { 'clippy' },
} }
-- To allow other plugins to add linters to require('lint').linters_by_ft, -- To allow other plugins to add linters to require('lint').linters_by_ft,