diff options
Diffstat (limited to '.config/nvim/lua/keybinds.lua')
-rw-r--r-- | .config/nvim/lua/keybinds.lua | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua index 6094a61..3b7a1ca 100644 --- a/.config/nvim/lua/keybinds.lua +++ b/.config/nvim/lua/keybinds.lua @@ -4,6 +4,7 @@ local ufo = require("ufo") local nt_api = require("nvim-tree.api") local spider = require("spider") local toggle_plain = require("utils").toggle_plain; +local trouble = require("trouble") vim.g.mapleader = " " @@ -37,7 +38,8 @@ vim.keymap.set("n", "<Leader>U", vim.cmd.UndotreeToggle) vim.keymap.set("n", "<Leader>m", ":MinimapToggle<CR>") vim.keymap.set("n", "<Leader>b", ":Gitsigns blame_line<CR>") vim.keymap.set("n", "<Leader>h", ":Gitsigns preview_hunk<CR>") -vim.keymap.set("n", "<Leader>,", ":TroubleToggle<CR>") +vim.keymap.set("n", "<Leader>,", function() trouble.toggle("diagnostics") end) +-- ":Trouble diagnostics toggle focus=false filter.buf=0<CR>") vim.keymap.set("n", "<Leader>t", ":belowright split | resize 5 | terminal<CR>") vim.keymap.set("n", "<Leader>[", ufo.openAllFolds) @@ -65,29 +67,29 @@ vim.keymap.set({ "t" }, "<ESC>", "<C-\\><C-n>") vim.opt.whichwrap = "<,>,h,l,[,]" wk.add({ - { "<leader>,", desc = "Show errors" }, - { "<leader><CR>", desc = "Quick Action" }, - { "<leader><TAB>", desc = "Show buffers" }, - { "<leader>D", desc = "Definition" }, - { "<leader>F", desc = "Format" }, - { "<leader>J", desc = "Signature help" }, - { "<leader>K", desc = "Hover" }, - { "<leader>L", desc = "Toggle plain mode" }, - { "<leader>N", desc = "Next tab" }, - { "<leader>P", desc = "Previous tab" }, - { "<leader>R", desc = "Show References" }, - { "<leader>S", desc = "Symbols" }, - { "<leader>U", desc = "Undo tree" }, - { "<leader>[", desc = "Open folds" }, - { "<leader>]", desc = "Close folds" }, - { "<leader>b", desc = "Blame line" }, - { "<leader>d", desc = "Show diagnostics" }, - { "<leader>f", desc = "Find files" }, - { "<leader>h", desc = "Preview hunk" }, - { "<leader>m", desc = "Toggle Minimap" }, - { "<leader>n", desc = "Show file tree" }, - { "<leader>q", desc = "Quit" }, - { "<leader>r", desc = "Rename" }, - { "<leader>s", desc = "Save file" }, - { "<leader>t", desc = "Open terminal" }, + { "<leader>,"; desc = "Show errors" }; + { "<leader><CR>"; desc = "Quick Action" }; + { "<leader><TAB>"; desc = "Show buffers" }; + { "<leader>D"; desc = "Definition" }; + { "<leader>F"; desc = "Format" }; + { "<leader>J"; desc = "Signature help" }; + { "<leader>K"; desc = "Hover" }; + { "<leader>L"; desc = "Toggle plain mode" }; + { "<leader>N"; desc = "Next tab" }; + { "<leader>P"; desc = "Previous tab" }; + { "<leader>R"; desc = "Show References" }; + { "<leader>S"; desc = "Symbols" }; + { "<leader>U"; desc = "Undo tree" }; + { "<leader>["; desc = "Open folds" }; + { "<leader>]"; desc = "Close folds" }; + { "<leader>b"; desc = "Blame line" }; + { "<leader>d"; desc = "Show diagnostics" }; + { "<leader>f"; desc = "Find files" }; + { "<leader>h"; desc = "Preview hunk" }; + { "<leader>m"; desc = "Toggle Minimap" }; + { "<leader>n"; desc = "Show file tree" }; + { "<leader>q"; desc = "Quit" }; + { "<leader>r"; desc = "Rename" }; + { "<leader>s"; desc = "Save file" }; + { "<leader>t"; desc = "Open terminal" }; }, { prefix = "<leader>" }); |