clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lazygit update

+70 -2
+1 -2
nvim/lua/sspaeti/remap.lua
··· 109 109 --GIT: Start 110 110 -- 111 111 -- LazyGit 112 - vim.api.nvim_set_keymap('n', '<leader>gg', ':LazyGit<CR>', {noremap = true, silent = true}) 113 - vim.api.nvim_set_keymap('n', '<leader>lg', ':LazyGit<CR>', {noremap = true, silent = true}) 112 + vim.api.nvim_set_keymap('n', '<leader>lG', ':LazyGit<CR>', {noremap = true, silent = true}) --> replaces with snack.nvim 114 113 --Blamer 115 114 vim.api.nvim_set_keymap('n', '<leader>gb', ':BlamerToggle<CR>', {noremap = true, silent = true}) 116 115 --Diffview.nvim
+69
nvim/lua/sspaeti/set.lua
··· 149 149 let w:surround_{char2nr('w')} = "```\r```" 150 150 let b:surround_{char2nr('b')} = "**\r**" 151 151 ]] 152 + 153 + 154 + -- Configure a special handler for lazygit specifically to still move with `vim-tmux-navigator` 155 + -- -> if Lazygit open as floating window, when c-l c-r etc used for navigation, it will close lazygit first and then navigate. Instead of showing the error 156 + vim.api.nvim_create_autocmd("TermOpen", { 157 + pattern = "*lazygit*", 158 + callback = function() 159 + local buf = vim.api.nvim_get_current_buf() 160 + local term_job_id = vim.b.terminal_job_id 161 + local opts = {buffer = buf, silent = true} 162 + 163 + -- Helper function to send keys to terminal 164 + local function send_keys(keys) 165 + vim.fn.chansend(term_job_id, keys) 166 + end 167 + 168 + -- Define special mappings that will quit lazygit first, then perform tmux navigation 169 + vim.keymap.set('t', '<C-h>', function() 170 + send_keys('q') -- Send 'q' to quit lazygit 171 + vim.defer_fn(function() 172 + -- Exit terminal mode properly and then run the command 173 + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, true, true), 'n', false) 174 + vim.defer_fn(function() 175 + vim.cmd("TmuxNavigateLeft") 176 + end, 50) 177 + end, 100) -- Small delay to ensure lazygit closes first 178 + end, opts) 179 + 180 + vim.keymap.set('t', '<C-j>', function() 181 + send_keys('q') 182 + vim.defer_fn(function() 183 + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, true, true), 'n', false) 184 + vim.defer_fn(function() 185 + vim.cmd("TmuxNavigateDown") 186 + end, 50) 187 + end, 100) 188 + end, opts) 189 + 190 + vim.keymap.set('t', '<C-k>', function() 191 + send_keys('q') 192 + vim.defer_fn(function() 193 + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, true, true), 'n', false) 194 + vim.defer_fn(function() 195 + vim.cmd("TmuxNavigateUp") 196 + end, 50) 197 + end, 100) 198 + end, opts) 199 + 200 + vim.keymap.set('t', '<C-l>', function() 201 + send_keys('q') 202 + vim.defer_fn(function() 203 + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, true, true), 'n', false) 204 + vim.defer_fn(function() 205 + vim.cmd("TmuxNavigateRight") 206 + end, 50) 207 + end, 100) 208 + end, opts) 209 + 210 + vim.keymap.set('t', '<C-\\>', function() 211 + send_keys('q') 212 + vim.defer_fn(function() 213 + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, true, true), 'n', false) 214 + vim.defer_fn(function() 215 + vim.cmd("TmuxNavigatePrevious") 216 + end, 50) 217 + end, 100) 218 + end, opts) 219 + end 220 + })