this repo has no description
0
fork

Configure Feed

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

keys, and move lazygit into it's own file

+43 -41
+2
nvim/init.lua
··· 6 6 -- Loads plugins 7 7 require("config.lazy") 8 8 9 + require("config.lazygit") 10 + 9 11 -- Uses which-key plugin 10 12 require("config.keys")
+16 -40
nvim/lua/config/keys.lua
··· 1 1 local wk = require("which-key") 2 2 3 - vim.cmd([[ 4 - augroup netrw_mappings 5 - autocmd! 6 - autocmd filetype netrw silent! nunmap <buffer> <c-l> 7 - augroup END 8 - ]]) 9 - 10 - local Terminal = require("toggleterm.terminal").Terminal 11 - 12 - -- Create a lazygit fullscreen terminal 13 - local lazygit = Terminal:new({ 14 - cmd = "lazygit", 15 - direction = "float", -- This can use "horizontal" or "vertical" if float doesn't fill 16 - float_opts = { 17 - border = "none", -- or single/double if you prefer 18 - width = function() 19 - return vim.o.columns 20 - end, -- full width 21 - height = function() 22 - return vim.o.lines 23 - end, -- full height 24 - }, 25 - -- adjust other options as needed 26 - hidden = true, 27 - }) 28 - 29 - function _LAZYGIT_TOGGLE() 30 - lazygit:toggle() 31 - end 32 - 33 - vim.cmd("command! LazyGit lua _LAZYGIT_TOGGLE()") 34 - 35 - function _TOGGLE_QF_LIST() 3 + function qflist_is_open() 36 4 local is_open = false 37 5 for _, win in ipairs(vim.fn.getwininfo()) do 38 6 if win.quickfix == 1 then ··· 40 8 break 41 9 end 42 10 end 43 - if is_open then 44 - vim.cmd("cclose") 45 - else 46 - vim.cmd("copen") 47 - end 11 + return is_open 48 12 end 13 + function _TOGGLE_QF_LIST() end 49 14 50 15 wk.add({ 51 16 { "<C-h>", "<C-w>h", desc = "Move focus to left pane" }, ··· 99 64 { "<leader>sc", "<cmd>Telescope commands<cr>", desc = "Commands" }, 100 65 101 66 -- TODO: Make this a toggle? 102 - { "<leader>co", _TOGGLE_QF_LIST, desc = "Toggle QF list" }, 67 + { 68 + "<leader>co", 69 + function() 70 + if qflist_is_open() then 71 + vim.cmd("cclose") 72 + else 73 + vim.cmd("copen") 74 + end 75 + end, 76 + desc = "Toggle QF list", 77 + }, 103 78 { "<leader>cn", "<cmd>cnext<cr>", desc = "Next QF item" }, 104 79 { "<leader>cp", "<cmd>cprev<cr>", desc = "Prev QF item" }, 105 80 ··· 162 137 silent = true, 163 138 }, 164 139 165 - { "<leader>ai", "<cmd>AI<cr>", desc = "AI complete" }, 140 + { "<leader>ai", ":AI", desc = "AI complete" }, 141 + { "<leader>ac", ":AIChat ", desc = "AI chat" }, 166 142 { "<leader>ae", ":AIEdit ", desc = "AI edit", mode = "v" }, 167 143 { "<leader>ar", "<cmd>AIRedo<cr>", desc = "AI redo last" }, 168 144
+24
nvim/lua/config/lazygit.lua
··· 1 + local Terminal = require("toggleterm.terminal").Terminal 2 + 3 + -- Create a lazygit fullscreen terminal 4 + local lazygit = Terminal:new({ 5 + cmd = "lazygit", 6 + direction = "float", -- This can use "horizontal" or "vertical" if float doesn't fill 7 + float_opts = { 8 + border = "none", -- or single/double if you prefer 9 + width = function() 10 + return vim.o.columns 11 + end, -- full width 12 + height = function() 13 + return vim.o.lines 14 + end, -- full height 15 + }, 16 + -- adjust other options as needed 17 + hidden = true, 18 + }) 19 + 20 + function _LAZYGIT_TOGGLE() 21 + lazygit:toggle() 22 + end 23 + 24 + vim.cmd("command! LazyGit lua _LAZYGIT_TOGGLE()")
+1 -1
nvim/lua/plugins/ui.lua
··· 24 24 git_ignored = false, 25 25 }, 26 26 view = { 27 - width = 50, 27 + width = 40, 28 28 }, 29 29 on_attach = function(bufnr) 30 30 local api = require("nvim-tree.api")