Merge branch 'master' of gitea.suda.codes:sudacode/nvim

This commit is contained in:
ksyasuda 2024-08-24 01:23:03 -07:00
commit 324074bb1c
No known key found for this signature in database

View File

@ -95,126 +95,181 @@ require('packer').startup(function(use)
"jackMort/ChatGPT.nvim", "jackMort/ChatGPT.nvim",
commit = "24bcca7", commit = "24bcca7",
config = function() config = function()
require("chatgpt").setup({ require("chatgpt").setup(
api_key_cmd = "cat /home/stickuser/.config/openai/apikey", {
yank_register = "+", api_key_cmd = "cat /home/sudacode/.openaikey",
edit_with_instructions = { yank_register = "+",
diff = false, edit_with_instructions = {
keymaps = { diff = false,
close = "<C-c>", keymaps = {
accept = "<C-y>", close = "<C-c>",
toggle_diff = "<C-d>", accept = "<C-y>",
toggle_settings = "<C-o>", toggle_diff = "<C-d>",
cycle_windows = "<Tab>", toggle_settings = "<C-o>",
use_output_as_input = "<C-i>" toggle_help = "<C-h>",
} cycle_windows = "<Tab>",
}, use_output_as_input = "<C-i>",
chat = { },
welcome_message = "HELLO FREUD", },
loading_text = "Loading, please wait ...", chat = {
question_sign = "", welcome_message = WELCOME_MESSAGE,
answer_sign = "", loading_text = "Loading, please wait ...",
max_line_length = 120, question_sign = "", -- 🙂
sessions_window = { answer_sign = "", -- 🤖
border = { border_left_sign = "",
style = "rounded", border_right_sign = "",
text = { top = " Sessions " } max_line_length = 120,
}, sessions_window = {
win_options = { active_sign = "",
winhighlight = "Normal:Normal,FloatBorder:FloatBorder" inactive_sign = "",
} current_line_sign = "",
}, border = {
keymaps = { style = "rounded",
close = { "<C-c>" }, text = {
yank_last = "<C-y>", top = " Sessions ",
yank_last_code = "<C-k>", },
scroll_up = "<C-u>", },
scroll_down = "<C-d>", win_options = {
new_session = "<C-n>", winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
cycle_windows = "<Tab>", },
cycle_modes = "<C-f>", },
select_session = "<Space>", keymaps = {
rename_session = "r", close = "<C-c>",
delete_session = "d", yank_last = "<C-y>",
draft_message = "<C-d>", yank_last_code = "<C-k>",
toggle_settings = "<C-o>", scroll_up = "<C-u>",
toggle_message_role = "<C-r>", scroll_down = "<C-d>",
toggle_system_role_open = "<C-s>", new_session = "<C-n>",
stop_generating = "<C-x>" cycle_windows = "<Tab>",
} cycle_modes = "<C-f>",
}, next_message = "<C-j>",
popup_layout = { prev_message = "<C-k>",
default = "center", select_session = "<Space>",
center = { width = "80%", height = "80%" }, rename_session = "r",
right = { width = "30%", width_settings_open = "50%" } delete_session = "d",
}, draft_message = "<C-r>",
popup_window = { edit_message = "e",
border = { delete_message = "d",
highlight = "FloatBorder", toggle_settings = "<C-o>",
style = "rounded", toggle_sessions = "<C-p>",
text = { top = " ChatGPT " } toggle_help = "<C-h>",
}, toggle_message_role = "<C-r>",
win_options = { toggle_system_role_open = "<C-s>",
wrap = true, stop_generating = "<C-x>",
linebreak = true, },
foldcolumn = "1", },
winhighlight = "Normal:Normal,FloatBorder:FloatBorder" popup_layout = {
}, default = "center",
buf_options = { filetype = "markdown" } center = {
}, width = "80%",
system_window = { height = "80%",
border = { },
highlight = "FloatBorder", right = {
style = "rounded", width = "30%",
text = { top = " SYSTEM " } width_settings_open = "50%",
}, },
win_options = { },
wrap = true, popup_window = {
linebreak = true, border = {
foldcolumn = "2", highlight = "FloatBorder",
winhighlight = "Normal:Normal,FloatBorder:FloatBorder" style = "rounded",
} text = {
}, top = " ChatGPT ",
popup_input = { },
prompt = "", },
border = { win_options = {
highlight = "FloatBorder", wrap = true,
style = "rounded", linebreak = true,
text = { top_align = "center", top = " Prompt " } foldcolumn = "1",
}, winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
win_options = { },
winhighlight = "Normal:Normal,FloatBorder:FloatBorder" buf_options = {
}, filetype = "markdown",
submit = "<C-Enter>", },
submit_n = "<Enter>", },
max_visible_lines = 20 system_window = {
}, border = {
settings_window = { highlight = "FloatBorder",
border = { style = "rounded", text = { top = " Settings " } }, style = "rounded",
win_options = { text = {
winhighlight = "Normal:Normal,FloatBorder:FloatBorder" top = " SYSTEM ",
} },
}, },
openai_params = { win_options = {
model = "gpt-3.5-turbo", wrap = true,
frequency_penalty = 0, linebreak = true,
presence_penalty = 0, foldcolumn = "2",
max_tokens = 300, winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
temperature = 0, },
top_p = 1, },
n = 1 popup_input = {
}, prompt = "",
openai_edit_params = { border = {
model = "code-davinci-edit-001", highlight = "FloatBorder",
temperature = 0, style = "rounded",
top_p = 1, text = {
n = 1 top_align = "center",
}, top = " Prompt ",
actions_paths = {}, },
show_quickfixes_cmd = "Trouble quickfix", },
predefined_chat_gpt_prompts = win_options = {
"https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv" winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
}) },
submit = "<C-Enter>",
submit_n = "<Enter>",
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, end,
requires = { requires = {
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",