feat: use Telescope for diagnostics
This commit is contained in:
parent
260a273957
commit
3825a97554
@ -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
|
||||||
|
Reference in New Issue
Block a user