From 81da838549f215816eb9bdb05e166eaf44275e75 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 24 Apr 2025 13:06:38 +0300 Subject: Added snacks gitbrowse to open the current file in a github repo (or copy the url of that) --- .config/nvim/lua/plugins/snacks.lua | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to '.config/nvim/lua/plugins/snacks.lua') diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua index 7f2cfa8..6c74e62 100644 --- a/.config/nvim/lua/plugins/snacks.lua +++ b/.config/nvim/lua/plugins/snacks.lua @@ -24,25 +24,46 @@ return { }, }, keys = { + { + 'go', + function() + Snacks.gitbrowse.open() + end, + desc = '[G]it [O]pen', + }, + { + 'gc', + function() + Snacks.gitbrowse.open({ + open = function(url) + vim.fn.setreg('+', url) + end, + }) + end, + desc = '[G]it [O]pen', + }, + { 'si', function() Snacks.image.hover() end, + desc = '[S]how [I]mage', }, + { 'nd', function() Snacks.notifier.hide() end, - desc = '[N]otifications [D]ismiss All', + desc = '[N]otification [D]ismiss All', }, { 'nh', function() Snacks.notifier.show_history() end, - desc = '[N]otifications [D]ismiss All', + desc = '[N]otification [H]istory', }, }, } -- cgit v1.3.1