aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/lua/plugins/diagnostics.lua
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-08-16 16:28:22 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-08-16 16:28:22 -0400
commite184d7cee358abc277a51f040cacf236f1eaceab (patch)
treebfc7ced143a04d6d79f955ca7c37b962a01773f3 /nvim/lua/plugins/diagnostics.lua
parentd3230ab29e56f97966f05cf2232a2e92d6a1302f (diff)
removed lspzero, updated keymaps
Diffstat (limited to 'nvim/lua/plugins/diagnostics.lua')
-rw-r--r--nvim/lua/plugins/diagnostics.lua67
1 files changed, 67 insertions, 0 deletions
diff --git a/nvim/lua/plugins/diagnostics.lua b/nvim/lua/plugins/diagnostics.lua
new file mode 100644
index 0000000..78c3f02
--- /dev/null
+++ b/nvim/lua/plugins/diagnostics.lua
@@ -0,0 +1,67 @@
+return {
+ 'folke/trouble.nvim',
+ opts = {},
+ cmd = 'Trouble',
+ keys = {
+ {
+ "<leader>df",
+ function()
+ local trouble = require("trouble")
+ local opts = {
+ mode = "diagnostics",
+ focus = true,
+ follow = false
+ }
+ if trouble.is_open(opts) then
+ trouble.close(opts)
+ else
+ trouble.open(opts)
+ end
+ end,
+ desc = "Diagnostics (Trouble)",
+ },
+ {
+ "<leader>dF",
+ function()
+ local trouble = require("trouble")
+ local opts = {
+ mode = "diagnostics",
+ focus = true,
+ follow = false,
+ filter = { buf = 0 }
+ }
+ if not trouble.is_open(opts) then
+ trouble.open(opts)
+ trouble.focus(opts)
+ else
+ trouble.close(opts)
+ end
+ end,
+ desc = "Buffer Diagnostics (Trouble)",
+ },
+ {
+ "[d",
+ function()
+ require("trouble").prev({ mode = "diagnostics", jump = true })
+ end,
+ desc = "Previous project wide diagnostic"
+ },
+ {
+ "]d",
+ function()
+ require("trouble").next({ mode = "diagnostics", jump = true })
+ end,
+ desc = "Next project wide diagnostic"
+ },
+ {
+ "<leader>dl",
+ "<cmd>Trouble loclist toggle<cr>",
+ desc = "Location List (Trouble)",
+ },
+ {
+ "<leader>dq",
+ "<cmd>Trouble qflist toggle<cr>",
+ desc = "Quickfix List (Trouble)",
+ },
+ },
+}