aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/keybinds.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/keybinds.lua')
-rw-r--r--.config/nvim/lua/keybinds.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua
index 0846a1c..ac3b9d3 100644
--- a/.config/nvim/lua/keybinds.lua
+++ b/.config/nvim/lua/keybinds.lua
@@ -1,5 +1,7 @@
-local telescope = require('telescope.builtin')
+local telescope = require("telescope.builtin")
local wk = require("which-key")
+local ufo = require("ufo")
+local renamer = require("renamer")
local nt_api = require("nvim-tree.api")
vim.g.mapleader = " "
@@ -16,15 +18,17 @@ vim.keymap.set("n", "<Leader><CR>", vim.lsp.buf.code_action)
vim.keymap.set("n", "<Leader>K", vim.lsp.buf.hover)
vim.keymap.set("n", "<Leader>D", vim.lsp.buf.definition)
vim.keymap.set("n", "<Leader>F", vim.lsp.buf.formatting)
+vim.keymap.set("n", "<Leader>d", vim.diagnostic.open_float)
vim.keymap.set("n", "<Leader>f", telescope.find_files)
vim.keymap.set("n", "<Leader><TAB>", telescope.buffers)
-vim.api.nvim_command("nnoremap <buffer> <Leader>, :TroubleToggle<CR>")
+vim.keymap.set("n", "<Leader>m", ":MinimapToggle<CR>")
+vim.keymap.set("n", "<Leader>,", ":TroubleToggle<CR>")
-vim.keymap.set("n", "<Leader>[", require("ufo").openAllFolds)
-vim.keymap.set("n", "<Leader>]", require("ufo").closeAllFolds)
-vim.keymap.set("n", "<Leader>r", require("renamer").rename)
+vim.keymap.set("n", "<Leader>[", ufo.openAllFolds)
+vim.keymap.set("n", "<Leader>]", ufo.closeAllFolds)
+vim.keymap.set("n", "<Leader>r", renamer.rename)
vim.opt.whichwrap = "<,>,h,l,[,]"
@@ -40,7 +44,7 @@ wk.register({
["]"] = "Close folds";
["r"] = "Rename";
["n"] = "Show file tree";
-}, {
- prefix = "<leader>";
-});
+ ["m"] = "Toggle Minimap";
+ ["d"] = "Show diagnostics";
+}, { prefix = "<leader>" });