Compare commits

..

No commits in common. "f6e28f43d006acbe65fe46c3a13c4e3505800221" and "8be85f827ffa5b4bb283698aa942d0e5ef563d9b" have entirely different histories.

5 changed files with 38 additions and 51 deletions

1
.gitignore vendored
View file

@ -2,4 +2,3 @@
.direnv
*.R
.Rlibs
.nvimcom

12
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1776413584,
"narHash": "sha256-xqqv46MTveuT4yJH2YihmbHGy5mdLnnLFDebVmUws/E=",
"lastModified": 1776140472,
"narHash": "sha256-yOR+i8ZLzATQhR2zANTog8lpmenm0c4Et/PIV4vBZZY=",
"owner": "dwinkler1",
"repo": "fran",
"rev": "da09626e4dd8f0f57078b3a04e0443a8c20defa1",
"rev": "697a1c07e7f0c69a5850667804aa439f9dd733b1",
"type": "github"
},
"original": {
@ -101,11 +101,11 @@
]
},
"locked": {
"lastModified": 1776464146,
"narHash": "sha256-XwLFfJDz71vIF7BAhnbLhrzQjmDC2uXdo7N0oHUrYzA=",
"lastModified": 1776375800,
"narHash": "sha256-/SSAR77Brr9fbapsh1cb2K47JXCbvwS1GjM4yyDxle8=",
"owner": "BirdeeHub",
"repo": "nix-wrapper-modules",
"rev": "75febede14a0845f4ef429da692a0698bf433600",
"rev": "f11469ca69068bac13d9e163b2bd268cc06dff57",
"type": "github"
},
"original": {

View file

@ -67,8 +67,7 @@ if vim.fn.has('nvim-0.11') == 1 then
end
if vim.fn.has('nvim-0.12') == 1 then
vim.o.pummaxwidth = 100 -- Limit maximum width of popup menu
-- vim.o.completefuzzycollect = 'keyword,files,whole_line' -- Use fuzzy matching when collecting candidates
vim.opt.completeopt = { "menu", "popup", "fuzzy", "longest" }
vim.o.completefuzzycollect = 'keyword,files,whole_line' -- Use fuzzy matching when collecting candidates
end
vim.o.complete = '.,w,b,kspell' -- Use spell check and don't use tags for completion

View file

@ -67,18 +67,18 @@ nmap_leader('<S-Tab>', '<Cmd>bprev<CR>', 'Prev buffer')
-- a is for 'AI'
nmap_leader("ac", "<cmd>CodeCompanionChat Toggle<CR>", "Chat Toggle")
-- nmap_leader("ae", "<cmd>CodeCompanion /explain<CR>", "Explain Code")
-- nmap_leader("af", "<cmd>CodeCompanion /fix<CR>", "Fix Code")
nmap_leader("ae", "<cmd>CodeCompanion /explain<CR>", "Explain Code")
nmap_leader("af", "<cmd>CodeCompanion /fix<CR>", "Fix Code")
nmap_leader("ag", "<cmd>CodeCompanion /commit<CR>", "Generate commit message")
nmap_leader("ai", "<cmd>CodeCompanionActions<CR>", "Chat Action")
nmap_leader("al", "<cmd>CodeCompanion /lsp<CR>", "Explain LSP Diagnostics")
nmap_leader("an", "<cmd>CodeCompanionChat Add<CR>", "Chat New")
nmap_leader("as", "<cmd>CodeCompanion /suggest<CR>", "Suggest Improvements")
--nmap_leader("ax", "<cmd>CodeCompanion /fixer<CR>", "Code Fixer")
nmap_leader("ax", "<cmd>CodeCompanion /fixer<CR>", "Code Fixer")
nmap_leader("ax", "<cmd>CodeCompanion /fixer<CR>", "Code Fixer")
xmap_leader("ae", "<cmd>CodeCompanion /explain<CR>", "Explain Code")
xmap_leader("af", "<cmd>CodeCompanion /fix<CR>", "Fix Code")
--xmap_leader("ap", "<cmd>CodeCompanion /expert<CR>", "Code Fixer")
xmap_leader("ap", "<cmd>CodeCompanion /expert<CR>", "Code Fixer")
xmap_leader("ap", "<cmd>CodeCompanion /expert<CR>", "Code Fixer")
xmap_leader("as", "<cmd>CodeCompanion /suggest<CR>", "Suggest Improvements")

View file

@ -1,6 +1,5 @@
local add = Config.add
local later = MiniDeps.later
local now = MiniDeps.now
local now_if_args = Config.now_if_args
-- Constants
@ -84,33 +83,16 @@ end
local function get_codecompanion_config()
return {
interactions = {
chat = {
adapter = {
name = "copilot",
model = "gemini-3.1-pro-preview",
},
opts = {
completion_provider = "blink",
},
},
inline = {
adapter = {
name = "copilot",
model = "gemini-3.1-pro-preview",
adapters = {
http = {
copilot = function()
return require("codecompanion.adapters").extend("copilot", {
schema = {
model = { default = "gemini-3-pro-preview" }
}
})
end,
}
},
keymaps = {
accept_change = {
modes = { n = "ga" },
description = "Accept the suggested change",
},
reject_change = {
modes = { n = "gr" },
opts = { nowait = true },
description = "Reject the suggested change",
},
},
},
display = {
chat = {
@ -123,10 +105,10 @@ local function get_codecompanion_config()
},
},
prompt_library = {
["expert"] = {
interaction = "chat",
["Code Expert"] = {
strategy = "chat",
description = "Get expert advice from an LLM",
--opts = create_common_opts("<localleader>ae", "expert"),
opts = create_common_opts("<localleader>ae", "expert"),
prompts = {
{
role = "system",
@ -143,10 +125,10 @@ local function get_codecompanion_config()
},
},
},
["fixer"] = {
interaction = "chat",
["Code Fixer"] = {
strategy = "chat",
description = "Fix code errors with expert guidance",
--opts = create_common_opts("<localleader>af", "afixer"),
opts = create_common_opts("<localleader>af", "afixer"),
prompts = {
{
role = "system",
@ -163,10 +145,17 @@ local function get_codecompanion_config()
},
},
},
["suggest"] = {
interaction = "chat",
["Suggest"] = {
strategy = "chat",
description = "Suggest improvements to the buffer",
--opts = create_common_opts("<localleader>as", "suggest"),
opts = {
mapping = "<localleader>as",
modes = { "v" },
short_name = "suggest",
auto_submit = true,
user_prompt = false,
stop_context_insertion = false,
},
prompts = {
{
role = "system",