feat: use Telescope for diagnostics

This commit is contained in:
mandlm 2022-02-23 21:22:28 +01:00
parent 260a273957
commit 3825a97554
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7

View File

@ -93,15 +93,8 @@ local function custom_on_attach(client, buffer_nr)
bufnnoremap("<C-n>", "<Cmd>lua vim.diagnostic.goto_next()<CR>") bufnnoremap("<C-n>", "<Cmd>lua vim.diagnostic.goto_next()<CR>")
bufnnoremap("<C-p>", "<Cmd>lua vim.diagnostic.goto_prev()<CR>") bufnnoremap("<C-p>", "<Cmd>lua vim.diagnostic.goto_prev()<CR>")
-- Show line diagnostics -- Open diagnostics
bufnnoremap("<leader>d", bufnnoremap("<leader>d", "<Cmd>Telescope diagnostics<CR>")
'<Cmd>lua vim.diagnostic.open_float(0, {scope = "line"})<CR>')
-- Open local diagnostics in local list
bufnnoremap("<leader>D", "<Cmd>lua vim.diagnostic.setloclist()<CR>")
-- Open all project diagnostics in quickfix list
bufnnoremap("<leader><C-d>", "<Cmd>lua vim.diagnostic.setqflist()<CR>")
-- disable conflicting formatters -- disable conflicting formatters
if client.name == "tsserver" or client.name == "html" then if client.name == "tsserver" or client.name == "html" then