From da5359364637eddbadcc188121c1a3e38afebba3 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 27 Oct 2024 23:55:50 +0200 Subject: Split the git.lua into 4 separate plugins --- .config/nvim/lua/custom/plugins/octo.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .config/nvim/lua/custom/plugins/octo.lua (limited to '.config/nvim/lua/custom/plugins/octo.lua') diff --git a/.config/nvim/lua/custom/plugins/octo.lua b/.config/nvim/lua/custom/plugins/octo.lua new file mode 100644 index 0000000..26c1dbb --- /dev/null +++ b/.config/nvim/lua/custom/plugins/octo.lua @@ -0,0 +1,23 @@ +return { + 'pwntester/octo.nvim', + cmd = 'Octo', + keys = { + { 'gi', 'Octo issue search', desc = '[G]ithub [I]ssues (local)' }, + { '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 } }) + + 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, +} -- cgit v1.3.1