File tree Expand file tree Collapse file tree
docs/manual/release-notes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 101101 - ` typst-preview.nvim ` : lazy-load.
102102 - ` vim-illuminate ` : lazy-load.
103103 - ` which-key.nvim ` : lazy-load.
104+ - ` plugins/git/octo-nvim ` : init.
104105
105106[ gmvar] ( https://github.com/gmvar ) :
106107
Original file line number Diff line number Diff line change 88 ./git-conflict
99 ./gitlinker-nvim
1010 ./neogit
11+ ./octo-nvim
1112 ] ;
1213
1314 options . vim . git = {
2122 * vim-fugitive
2223 * git-conflict
2324 * gitlinker-nvim
25+ * octo-nvim
2426 '' ;
2527 } ;
2628}
Original file line number Diff line number Diff line change 1+ {
2+ options ,
3+ config ,
4+ lib ,
5+ ...
6+ } : let
7+ inherit ( lib . modules ) mkIf mkDefault ;
8+ inherit ( lib . nvim . binds ) pushDownDefault mkKeymap ;
9+
10+ cfg = config . vim . git . octo-nvim ;
11+
12+ keys = cfg . mappings ;
13+ inherit ( options . vim . git . octo-nvim ) mappings ;
14+ in {
15+ config = mkIf cfg . enable {
16+ vim = {
17+ startPlugins = [ "plenary-nvim" ] ;
18+ visuals . nvim-web-devicons . enable = mkDefault true ;
19+
20+ lazy . plugins . octo-nvim = {
21+ package = "octo-nvim" ;
22+ setupModule = "octo" ;
23+ inherit ( cfg ) setupOpts ;
24+
25+ cmd = [ "Octo" ] ;
26+
27+ keys = [
28+ ( mkKeymap "n" keys . issueList ":Octo issue list<cr>" { desc = mappings . issueList . description ; } )
29+ ( mkKeymap "n" keys . prList ":Octo pr list<cr>" { desc = mappings . prList . description ; } )
30+ ( mkKeymap "n" keys . discussionList ":Octo discussion list<cr>" { desc = mappings . discussionList . description ; } )
31+ ( mkKeymap "n" keys . notificationList ":Octo notification list<cr>" { desc = mappings . notificationList . description ; } )
32+ ( mkKeymap "n" keys . search ''function() require("octo.utils").create_base_search_command { include_current_repo = true } end '' {
33+ desc = mappings . search . description ;
34+ lua = true ;
35+ } )
36+ ] ;
37+ } ;
38+
39+ binds . whichKey . register = pushDownDefault {
40+ "<leader>o" = "+Octo" ;
41+ } ;
42+ } ;
43+ } ;
44+ }
Original file line number Diff line number Diff line change 1+ {
2+ imports = [
3+ ./config.nix
4+ ./octo-nvim.nix
5+ ] ;
6+ }
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ lib ,
4+ ...
5+ } : let
6+ inherit ( lib . options ) mkEnableOption mkOption ;
7+ inherit ( lib . types ) enum ;
8+ inherit ( lib . nvim . types ) mkPluginSetupOption ;
9+ inherit ( config . vim . lib ) mkMappingOption ;
10+
11+ selectedPicker =
12+ if
13+ config . vim . utility . snacks-nvim . enable
14+ && ( config . vim . utility . snacks-nvim . setupOpts . picker . enabled or false )
15+ then "snacks"
16+ else if config . vim . telescope . enable
17+ then "telescope"
18+ else if config . vim . fzf-lua . enable
19+ then "fzf-lua"
20+ else "default" ;
21+ in {
22+ options . vim . git . octo-nvim = {
23+ enable = mkEnableOption "Edit and review GitHub issues, pull requests, and discussions from the comfort of your favorite editor. [octo-nvim]" ;
24+ setupOpts = mkPluginSetupOption "octo-nvim" {
25+ picker = mkOption {
26+ type = enum [ "telescope" "fzf-lua" "snacks" "default" ] ;
27+ default = selectedPicker ;
28+ description = "Picker backend used by octo.nvim" ;
29+ } ;
30+ } ;
31+ mappings = {
32+ issueList = mkMappingOption "List GitHub Issues" "<leader>oi" ;
33+ prList = mkMappingOption "List GitHub Pull Requests" "<leader>op" ;
34+ discussionList = mkMappingOption "List GitHub Discussions" "<leader>od" ;
35+ notificationList = mkMappingOption "List GitHub Notifications" "<leader>ol" ;
36+ search = mkMappingOption "Search GitHub" "<leader>os" ;
37+ } ;
38+ } ;
39+ }
Original file line number Diff line number Diff line change 23212321 "hash" : " sha256-9Su5t8cJAHlXV+EE4GLa1+BhezfHZIZgl2P6kBrkX8E=" ,
23222322 "frozen" : true
23232323 },
2324+ "octo-nvim" : {
2325+ "type" : " Git" ,
2326+ "repository" : {
2327+ "type" : " GitHub" ,
2328+ "owner" : " pwntester" ,
2329+ "repo" : " octo.nvim"
2330+ },
2331+ "branch" : " master" ,
2332+ "submodules" : false ,
2333+ "revision" : " 205f024d3ea4a3d81aac751b6bf8e2d01e0c204f" ,
2334+ "url" : " https://github.com/pwntester/octo.nvim/archive/205f024d3ea4a3d81aac751b6bf8e2d01e0c204f.tar.gz" ,
2335+ "hash" : " sha256-p5s9JhujDEZezYYsNygi9ejI4qlxluRO3jYWFdJkSrw="
2336+ },
23242337 "oil-git-status.nvim" : {
23252338 "type" : " Git" ,
23262339 "repository" : {
You can’t perform that action at this time.
0 commit comments