From 5c4f38c90cac4a6fe0db5a2118d84073ee7a66fd Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Mon, 27 Mar 2023 17:17:33 -0700 Subject: [PATCH] updates --- init.vim | 1 + lua/plugins.lua | 75 -------------------------------------- plugin-confs/chatgpt.lua | 77 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 75 deletions(-) create mode 100644 plugin-confs/chatgpt.lua diff --git a/init.vim b/init.vim index 7cef0f0..1b5574a 100644 --- a/init.vim +++ b/init.vim @@ -35,6 +35,7 @@ source ~/.config/nvim/plugin-confs/null-ls.lua source ~/.config/nvim/plugin-confs/nvim-cmp.lua source ~/.config/nvim/plugin-confs/fidget.lua source ~/.config/nvim/plugin-confs/symbols-outline.lua +source ~/.config/nvim/plugin-confs/chatgpt.lua " source ~/.config/nvim/plugin-confs/copilot.lua " source ~/.config/nvim/plugin-confs/lsp-signature.lua " source ~/.config/nvim/plugin-confs/nvim-docs-view.lua diff --git a/lua/plugins.lua b/lua/plugins.lua index c20de23..232d517 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -262,81 +262,6 @@ require('packer').startup(function(use) use({ "jackMort/ChatGPT.nvim", - config = function() - require("chatgpt").setup({ - welcome_message = WELCOME_MESSAGE, -- set to "" if you don't like the fancy robot - loading_text = "loading", - question_sign = "", -- you can use emoji if you want e.g. 🙂 - answer_sign = "ﮧ", -- 🤖 - max_line_length = 120, - yank_register = "+", - chat_layout = { - relative = "editor", - position = "50%", - size = { - height = "80%", - width = "80%", - }, - }, - chat_window = { - filetype = "chatgpt", - border = { - highlight = "FloatBorder", - style = "rounded", - text = { - top = " ChatGPT ", - }, - }, - }, - settings_window = { - border = { - style = "rounded", - text = { - top = " Settings ", - }, - }, - }, - chat_input = { - prompt = "  ", - border = { - highlight = "FloatBorder", - style = "rounded", - text = { - top_align = "center", - top = " Prompt ", - }, - }, - win_options = { - winhighlight = "Normal:Normal", - }, - }, - openai_params = { - model = "text-davinci-003", - frequency_penalty = 0, - presence_penalty = 0, - max_tokens = 300, - temperature = 0, - top_p = 1, - n = 1, - }, - openai_edit_params = { - -- model = "code-davinci-edit-001", - model = "gpt-3.5-turbo", - temperature = 0, - top_p = 1, - n = 1, - }, - keymaps = { - close = { "", "" }, - yank_last = "", - scroll_up = "", - scroll_down = "", - toggle_settings = "", - new_session = "", - cycle_windows = "", - } - } - )end, requires = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", diff --git a/plugin-confs/chatgpt.lua b/plugin-confs/chatgpt.lua new file mode 100644 index 0000000..6c0fffc --- /dev/null +++ b/plugin-confs/chatgpt.lua @@ -0,0 +1,77 @@ +require("chatgpt").setup({ + { + welcome_message = "ChatGPT is ready!", + loading_text = "loading", + question_sign = "", -- you can use emoji if you want e.g. 🙂 + answer_sign = "ﮧ", -- 🤖 + max_line_length = 120, + yank_register = "+", + chat_layout = { + relative = "editor", + position = "50%", + size = { + height = "80%", + width = "80%", + }, + }, + settings_window = { + border = { + style = "rounded", + text = { + top = " Settings ", + }, + }, + }, + chat_window = { + filetype = "chatgpt", + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top = " ChatGPT ", + }, + }, + }, + chat_input = { + prompt = "  ", + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top_align = "center", + top = " Prompt ", + }, + }, + }, + openai_params = { + model = "gpt-3.5-turbo", + frequency_penalty = 0, + presence_penalty = 0, + max_tokens = 300, + temperature = 0, + top_p = 1, + n = 1, + }, + openai_edit_params = { + model = "code-davinci-edit-001", + temperature = 0, + top_p = 1, + n = 1, + }, + keymaps = { + close = { "" }, + submit = "", + yank_last = "", + yank_last_code = "", + scroll_up = "", + scroll_down = "", + toggle_settings = "", + new_session = "", + cycle_windows = "", + -- in the Sessions pane + select_session = "", + rename_session = "r", + delete_session = "d", + }, + } +})