summaryrefslogtreecommitdiffstats
path: root/lua/conf/binds.lua
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2024-01-30 21:52:24 -0500
committerSquibid <me@zacharyscheiman.com>2024-01-30 21:52:24 -0500
commitd94b454eb61a0d0a99f9939560506c2db24f3315 (patch)
tree52dd40a8d51a79896750fa0fd0ea85fd3445405f /lua/conf/binds.lua
parente669b3eb8e27069ed0c52ea269e3c27debb989b6 (diff)
downloadnvim-d94b454eb61a0d0a99f9939560506c2db24f3315.tar.gz
nvim-d94b454eb61a0d0a99f9939560506c2db24f3315.tar.bz2
nvim-d94b454eb61a0d0a99f9939560506c2db24f3315.zip
way too lazy to sort this out, adding kitchen sink
Diffstat (limited to '')
-rw-r--r--lua/conf/binds.lua33
1 files changed, 20 insertions, 13 deletions
diff --git a/lua/conf/binds.lua b/lua/conf/binds.lua
index 3e9a3aa..11c791c 100644
--- a/lua/conf/binds.lua
+++ b/lua/conf/binds.lua
@@ -93,15 +93,8 @@ if pcall(require, "telescope") then
-- search for vim options
map('n', '<leader>sv', telebuilt.vim_options, { desc = 'Find vim options.' })
-- search for string in project
- map('n', '<leader>sp', function()
- vim.ui.input({ prompt = 'Find string in project' }, function(input)
- if not input or input == '' then
- vim.notify('No query!', vim.log.levels.WARN, { title = misc.appid })
- return nil
- end
- telebuilt.grep_string({ search = input })
- end)
- end, { desc = 'Find string in project.' })
+ map('n', '<leader>sp', telebuilt.live_grep, { desc = 'Find string in project.' })
+
-- Code Actions (requires telescope)
if pcall(require, "actions-preview") then
map({ "n", "v" }, "<leader>ca", require("actions-preview").code_actions, {
@@ -110,6 +103,24 @@ if pcall(require, "telescope") then
end
end
+-- harpoon
+if pcall(require, 'harpoon') then
+ local mark = require("harpoon.mark")
+ local ui = require("harpoon.ui")
+
+ map("n", "<leader>a", function()
+ mark.add_file()
+ vim.notify('added new file to quickmarks', vim.log.levels.INFO, {
+ title = misc.appid,
+ })
+ end)
+ map("n", "<C-e>", ui.toggle_quick_menu)
+ map('n', '<C-q>', function() ui.nav_file(1) end)
+ map('n', '<C-g>', function() ui.nav_file(2) end)
+ map('n', '<C-h>', function() ui.nav_file(3) end)
+ map('n', '<C-i>', function() ui.nav_file(4) end)
+end
+
map('n', '<leader>u', '<cmd>UndotreeToggle<CR>', { desc = 'Open undo tree.' })
map('n', '<leader>f', '<cmd>SFMToggle<CR>', { desc = 'Open file tree view.' })
map('n', '<leader>b', '<cmd>JABSOpen<CR>', { desc = 'Switch between buffers.' })
@@ -119,10 +130,6 @@ if pcall(require, "smart-splits") then
map('n', '<leader>r', smartsplits.start_resize_mode)
end
--- toggle term (don't use leader key in these binds)
-map({'n', 't'}, '<C-\\>', '<cmd>ToggleTerm direction=float<CR>')
-map({'n', 't'}, '<C-g>', '<cmd>lua _glow()<CR>')
-
-- git
map('n', '<leader>gp', '<cmd>Gitsigns preview_hunk_inline<CR>')
map('n', '<leader>gs', '<cmd>Gitsigns stage_hunk<CR>')