From f13a62d3fd2884865398627d8a168e0c7df82ff4 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sat, 3 May 2025 16:07:54 +0300 Subject: Changed some nvim stuff, giving a try to terminals again, added keybinds to easily open/close the terminal and also Ctrl+HJKL to navigate --- .config/nvim/lua/plugins/octo.lua | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to '.config/nvim/lua/plugins/octo.lua') diff --git a/.config/nvim/lua/plugins/octo.lua b/.config/nvim/lua/plugins/octo.lua index 96120af..ccb518d 100644 --- a/.config/nvim/lua/plugins/octo.lua +++ b/.config/nvim/lua/plugins/octo.lua @@ -1,6 +1,7 @@ return { 'pwntester/octo.nvim', cmd = 'Octo', + event = { { event = 'BufReadCmd', pattern = 'octo://*' } }, dependencies = { 'nvim-lua/plenary.nvim', 'folke/snacks.nvim', @@ -11,21 +12,24 @@ return { { 'pr', 'Octo pr search', desc = 'Github [PR]s (local)' }, { 'gI', 'Octo search is:issue is:open author:@me', desc = '[G]ithub [I]ssues (global)' }, { 'pR', 'Octo search is:pr author:@me', desc = 'Github [PR]s (global)' }, - }, - config = function() - require('octo').setup({ - suppress_missing_scope = { projects_v2 = true }, - picker = 'snacks', - }) - vim.treesitter.language.register('markdown', 'octo') - vim.api.nvim_create_autocmd('FileType', { - pattern = 'octo', - callback = function() - -- Autocomplete for @ (user mention) and # (issue) - vim.keymap.set('i', '@', '@', { silent = true, buffer = true }) - vim.keymap.set('i', '#', '#', { silent = true, buffer = true }) - end, - }) - end, + { 'a', '', desc = '+assignee (Octo)', ft = 'octo' }, + { 'c', '', desc = '+comment/code (Octo)', ft = 'octo' }, + { 'l', '', desc = '+label (Octo)', ft = 'octo' }, + { 'i', '', desc = '+issue (Octo)', ft = 'octo' }, + { 'r', '', desc = '+react (Octo)', ft = 'octo' }, + { 'p', '', desc = '+pr (Octo)', ft = 'octo' }, + { 'pr', '', desc = '+rebase (Octo)', ft = 'octo' }, + { 'ps', '', desc = '+squash (Octo)', ft = 'octo' }, + { 'v', '', desc = '+review (Octo)', ft = 'octo' }, + { 'g', '', desc = '+goto_issue (Octo)', ft = 'octo' }, + { '@', '', mode = 'i', ft = 'octo', silent = true }, + { '#', '', mode = 'i', ft = 'octo', silent = true }, + }, + opts = { + enable_builtin = true, + -- default_to_projects_v2 = true, + default_merge_method = 'squash', + picker = 'snacks', + }, } -- cgit v1.3.1