Public Access
filter project diagnostics by defualt
This commit is contained in:
@@ -119,7 +119,7 @@ Diagnostics:
|
|||||||
- `[g` jump to previous warning or error
|
- `[g` jump to previous warning or error
|
||||||
- `<leader>ti` toggle inline diagnostics
|
- `<leader>ti` toggle inline diagnostics
|
||||||
- `<leader>tv` toggle virtual diagnostics
|
- `<leader>tv` toggle virtual diagnostics
|
||||||
- `<leader>xx` toggle project diagnostics with `:Trouble diagnostics toggle`
|
- `<leader>xx` toggle project warnings and errors
|
||||||
|
|
||||||
## Tree-sitter
|
## Tree-sitter
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,17 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- diagnostics
|
-- diagnostics
|
||||||
map("n", "<leader>xx", "<Cmd>Trouble diagnostics toggle<CR>", { desc = "toggle project diagnostics" })
|
map("n", "<leader>xx", function()
|
||||||
|
require("trouble").toggle({
|
||||||
|
mode = "diagnostics",
|
||||||
|
filter = {
|
||||||
|
severity = {
|
||||||
|
vim.diagnostic.severity.ERROR,
|
||||||
|
vim.diagnostic.severity.WARN,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end, { desc = "toggle project warnings and errors" })
|
||||||
map("n", "g.", vim.diagnostic.open_float, { desc = "line diagnostics" })
|
map("n", "g.", vim.diagnostic.open_float, { desc = "line diagnostics" })
|
||||||
map("n", "gl", vim.diagnostic.setloclist, { desc = "diagnostic list" })
|
map("n", "gl", vim.diagnostic.setloclist, { desc = "diagnostic list" })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user