]> git.sthu.org Git - vimconf.git/commitdiff
plugins: Add gp.nvim
authorStefan Huber <shuber@sthu.org>
Tue, 6 Aug 2024 05:15:42 +0000 (07:15 +0200)
committerStefan Huber <shuber@sthu.org>
Tue, 6 Aug 2024 05:15:42 +0000 (07:15 +0200)
plugins-full.vim.example

index 8fcf354590d6cad8d229081bb8fb6d38d67ccbf1..31c4001f1185b155bd4b200a7298956e3798c9e5 100644 (file)
@@ -8,6 +8,8 @@ if has('nvim-0.5')
     endif
 
     Plug 'nvim-treesitter/nvim-treesitter-refactor', {'do': ':TSUpdate'}
+
+    Plug 'robitx/gp.nvim'
 endif
 
 if has('nvim-0.7')
@@ -175,6 +177,19 @@ function PluginsConfigFull()
                     },
                 },
             })
+
+            require("gp").setup({
+                providers = {
+                    copilot = {
+                        endpoint = "https://api.githubcopilot.com/chat/completions",
+                        secret = {
+                            "bash",
+                            "-c",
+                            "cat ~/.config/github-copilot/apps.json | sed -e 's/.*oauth_token...//;s/\".*//'",
+                        },
+                    }
+                }
+            })
 EOF
 
         set foldmethod=expr