1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-23 19:36:47 +00:00
dotfiles/.config/nvim/lua/plugins/copilot.lua

38 lines
1.2 KiB
Lua
Raw Normal View History

2024-02-12 19:46:40 +00:00
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
filetypes = {
javascript = true,
typescript = true,
go = true,
lua = true,
python = true,
sh = true,
yaml = true,
json = true,
["*"] = false,
},
})
require("copilot_cmp").setup()
2024-02-16 15:37:22 +00:00
local prompts = {
-- Code related prompts
Explain = "Please explain how the following code works.",
Review = "Please review the following code and provide suggestions for improvement.",
Tests = "Please explain how the selected code works, then generate unit tests for it.",
Refactor = "Please refactor the following code to improve its clarity and readability.",
FixCode = "Please fix the following code to make it work as intended.",
BetterNamings = "Please provide better names for the following variables and functions.",
-- Text related prompts
Spelling = "Please correct any grammar and spelling errors in the following text. Respect the markdown format when provided",
Wording = "Please improve the grammar and wording of the following text. Respect the markdown format when provided",
}
require("CopilotChat").setup({
show_help = "yes",
debug = false,
disable_extra_info = "yes",
prompts = prompts,
2024-02-22 16:52:44 +00:00
temperature = 0.1,
2024-02-16 15:37:22 +00:00
})