diff --git a/lua/plugins.lua b/lua/plugins.lua index dccbc56..270c5c2 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -95,126 +95,181 @@ require('packer').startup(function(use) "jackMort/ChatGPT.nvim", commit = "24bcca7", config = function() - require("chatgpt").setup({ - api_key_cmd = "cat /home/stickuser/.config/openai/apikey", - yank_register = "+", - edit_with_instructions = { - diff = false, - keymaps = { - close = "", - accept = "", - toggle_diff = "", - toggle_settings = "", - cycle_windows = "", - use_output_as_input = "" - } - }, - chat = { - welcome_message = "HELLO FREUD", - loading_text = "Loading, please wait ...", - question_sign = "", - answer_sign = "ﮧ", - max_line_length = 120, - sessions_window = { - border = { - style = "rounded", - text = { top = " Sessions " } - }, - win_options = { - winhighlight = "Normal:Normal,FloatBorder:FloatBorder" - } - }, - keymaps = { - close = { "" }, - yank_last = "", - yank_last_code = "", - scroll_up = "", - scroll_down = "", - new_session = "", - cycle_windows = "", - cycle_modes = "", - select_session = "", - rename_session = "r", - delete_session = "d", - draft_message = "", - toggle_settings = "", - toggle_message_role = "", - toggle_system_role_open = "", - stop_generating = "" - } - }, - popup_layout = { - default = "center", - center = { width = "80%", height = "80%" }, - right = { width = "30%", width_settings_open = "50%" } - }, - popup_window = { - border = { - highlight = "FloatBorder", - style = "rounded", - text = { top = " ChatGPT " } - }, - win_options = { - wrap = true, - linebreak = true, - foldcolumn = "1", - winhighlight = "Normal:Normal,FloatBorder:FloatBorder" - }, - buf_options = { filetype = "markdown" } - }, - system_window = { - border = { - highlight = "FloatBorder", - style = "rounded", - text = { top = " SYSTEM " } - }, - win_options = { - wrap = true, - linebreak = true, - foldcolumn = "2", - winhighlight = "Normal:Normal,FloatBorder:FloatBorder" - } - }, - popup_input = { - prompt = "  ", - border = { - highlight = "FloatBorder", - style = "rounded", - text = { top_align = "center", top = " Prompt " } - }, - win_options = { - winhighlight = "Normal:Normal,FloatBorder:FloatBorder" - }, - submit = "", - submit_n = "", - max_visible_lines = 20 - }, - settings_window = { - border = { style = "rounded", text = { top = " Settings " } }, - win_options = { - winhighlight = "Normal:Normal,FloatBorder:FloatBorder" - } - }, - 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 - }, - actions_paths = {}, - show_quickfixes_cmd = "Trouble quickfix", - predefined_chat_gpt_prompts = - "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv" - }) + require("chatgpt").setup( + { + api_key_cmd = "cat /home/sudacode/.openaikey", + yank_register = "+", + edit_with_instructions = { + diff = false, + keymaps = { + close = "", + accept = "", + toggle_diff = "", + toggle_settings = "", + toggle_help = "", + cycle_windows = "", + use_output_as_input = "", + }, + }, + chat = { + welcome_message = WELCOME_MESSAGE, + loading_text = "Loading, please wait ...", + question_sign = "", -- 🙂 + answer_sign = "ﮧ", -- 🤖 + border_left_sign = "", + border_right_sign = "", + max_line_length = 120, + sessions_window = { + active_sign = "  ", + inactive_sign = "  ", + current_line_sign = "", + border = { + style = "rounded", + text = { + top = " Sessions ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + keymaps = { + close = "", + yank_last = "", + yank_last_code = "", + scroll_up = "", + scroll_down = "", + new_session = "", + cycle_windows = "", + cycle_modes = "", + next_message = "", + prev_message = "", + select_session = "", + rename_session = "r", + delete_session = "d", + draft_message = "", + edit_message = "e", + delete_message = "d", + toggle_settings = "", + toggle_sessions = "", + toggle_help = "", + toggle_message_role = "", + toggle_system_role_open = "", + stop_generating = "", + }, + }, + popup_layout = { + default = "center", + center = { + width = "80%", + height = "80%", + }, + right = { + width = "30%", + width_settings_open = "50%", + }, + }, + popup_window = { + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top = " ChatGPT ", + }, + }, + win_options = { + wrap = true, + linebreak = true, + foldcolumn = "1", + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + buf_options = { + filetype = "markdown", + }, + }, + system_window = { + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top = " SYSTEM ", + }, + }, + win_options = { + wrap = true, + linebreak = true, + foldcolumn = "2", + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + popup_input = { + prompt = "  ", + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top_align = "center", + top = " Prompt ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + submit = "", + submit_n = "", + max_visible_lines = 20, + }, + settings_window = { + setting_sign = "  ", + border = { + style = "rounded", + text = { + top = " Settings ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + help_window = { + setting_sign = "  ", + border = { + style = "rounded", + text = { + top = " Help ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + 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 = "gpt-3.5-turbo", + frequency_penalty = 0, + presence_penalty = 0, + temperature = 0, + top_p = 1, + n = 1, + }, + use_openai_functions_for_edits = false, + actions_paths = {}, + show_quickfixes_cmd = "Trouble quickfix", + predefined_chat_gpt_prompts = "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv", + highlights = { + help_key = "@symbol", + help_description = "@comment", + }, + } + ) end, requires = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",