summaryrefslogtreecommitdiff
path: root/lua/getchoo/keybinds.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/getchoo/keybinds.lua')
-rw-r--r--lua/getchoo/keybinds.lua17
1 files changed, 14 insertions, 3 deletions
diff --git a/lua/getchoo/keybinds.lua b/lua/getchoo/keybinds.lua
index a71f606..7dab12e 100644
--- a/lua/getchoo/keybinds.lua
+++ b/lua/getchoo/keybinds.lua
@@ -5,9 +5,20 @@ local set = function(mode, key, vimcmd)
vim.keymap.set(mode, key, vimcmd, opts)
end
-set("n", "<leader>t", function()
- vim.cmd("NvimTreeToggle")
-end)
+if pcall(require, "neo-tree.command") then
+ set("n", "<leader>t", function()
+ require("neo-tree.command").execute({
+ toggle = true,
+ dir = vim.loop.cwd(),
+ })
+ end)
+end
+
+if pcall(require, "flash") then
+ set({ "n", "o", "x" }, "s", function()
+ require("flash").jump()
+ end)
+end
for i = 1, 9 do
set("n", "<leader>" .. i, function()