Finish GPT mappings

main
felixm 2023-06-17 09:09:39 -04:00
parent 90e87635b1
commit cf5b9d0d73
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
function gpt_complete_buffer()
function gpt_complete_file()
-- Store the current buffer name and escape special characters
local buf_name = vim.api.nvim_buf_get_name(0):gsub(' ', '\\ ')
@ -20,4 +20,4 @@ function gpt_complete_buffer()
end
vim.api.nvim_command('command! GptComplete lua gpt_complete_buffer()')
vim.api.nvim_command('command! GptCompleteFile lua gpt_complete_file()')

View File

@ -11,6 +11,7 @@ wk.register({
h = { "<cmd>Telescope help_tags<cr>", "Help Tags" },
s = { "<cmd>Telescope colorscheme<cr>", "Colorscheme" },
c = { "<cmd>Telescope commands<cr>", "Commands" },
p = { "<cmd>Telescope find_files search_dirs={'~/owc/gpt'}<CR>", "GPT" },
},
}, { prefix = "<leader>" })
@ -23,7 +24,7 @@ wk.register({
a = { "<cmd>unhide<cr>", "Show All" },
o = { "<cmd>Telescope buffers<cr>", "Open" },
e = { "<cmd>Oil<cr>", "Explorer" },
g = { "<cmd>GptComplete<cr>", "Call GPT" },
g = { "<cmd>w!<cr>|GptCompleteFile<cr>", "GPT Complete" },
},
}, { prefix = "<leader>" })