mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): add ChatGPT plugin
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"ChatGPT.nvim": { "branch": "main", "commit": "16eddf50d92fd089726f78d039982f8561bf90e6" },
|
||||
"LazyVim": { "branch": "main", "commit": "c433ea7aa842c446edc2b1570998bf5440c68188" },
|
||||
"LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "be4d1084397c9b9d3d5a41bda871e6b20415bf48" },
|
||||
|
||||
27
nvim/lua/plugins/chatgpg.lua
Normal file
27
nvim/lua/plugins/chatgpg.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{
|
||||
mode = "v",
|
||||
"<leader>e",
|
||||
function()
|
||||
require("chatgpt").edit_with_instructions()
|
||||
end,
|
||||
desc = "Edit with instructions",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local home = vim.fn.expand("$HOME")
|
||||
local file_path = home .. "/.dotfiles/nvim/lua/plugins/chatgpg.txt.gpg"
|
||||
require("chatgpt").setup({
|
||||
api_key_cmd = "gpg --decrypt --use-agent " .. file_path,
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
}
|
||||
2
nvim/lua/plugins/chatgpg.txt.gpg
Normal file
2
nvim/lua/plugins/chatgpg.txt.gpg
Normal file
@@ -0,0 +1,2 @@
|
||||
Ś
|
||||
ÁŔ‰ůĂűŇt.Őp8ă<38>1¤~Rp@t“r`rŘfM<66>Hâ-áeh‡<N:Ntµ‰G*˘żŃ<<3C>|d¦Éł˛‰&”™î2V§
|
||||
Reference in New Issue
Block a user