1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2025-07-01 19:49:25 +00:00

[neovim] Minimal refactor

This commit is contained in:
2024-02-16 16:37:22 +01:00
parent d1c002183f
commit 5d6b68c0bd
9 changed files with 70 additions and 44 deletions

View File

@ -16,7 +16,7 @@ local kind_icons = {
Color = "",
Constant = "",
Constructor = "",
Copilot = " ",
Copilot = " ",
Enum = "",
EnumMember = "",
Event = "",

View File

@ -15,3 +15,22 @@ require("copilot").setup({
})
require("copilot_cmp").setup()
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,
})

View File

@ -11,6 +11,7 @@ require("plugins.illuminate")
require("plugins.indentline")
require("plugins.lsp")
require("plugins.go")
require("plugins.typescript")
require("plugins.neotest")
require("plugins.dap")
require("plugins.noice")

View File

@ -8,6 +8,7 @@ require("lspsaga").setup({
},
code_action = {
show_server_name = true,
extend_gitsigns = true,
},
rename = {
auto_save = true,

View File

@ -54,7 +54,7 @@ local get_filetype = function()
if ft == "yaml" then
local schema = require("yaml-companion").get_buf_schema(0)
if schema.result[1].name == "none" then
if not schema or not schema.result or not schema.result[1].name then
return ft
end
@ -98,7 +98,20 @@ require("lualine").setup({
return true
end,
},
"copilot",
{
"copilot",
symbols = {
status = {
icons = {
enabled = "",
sleep = "",
disabled = "",
warning = "",
unknown = "",
},
},
},
},
lsp_progress,
{
require("noice").api.status.search.get,

View File

@ -0,0 +1,5 @@
require("typescript-tools").setup({
settings = {
complete_function_calls = true,
},
})