fix issue

This commit is contained in:
RingOfStorms (Joshua Bell) 2023-12-06 16:10:30 -06:00
parent 6b2b0c377a
commit 0505f0fb7f
2 changed files with 39 additions and 2 deletions

View file

@ -0,0 +1,37 @@
local U = require("util")
return {
"David-Kunz/gen.nvim",
enabled = function()
return U.cmd_executable("ollama", {
[false] = function()
vim.notify("ollama not installed, gen disabled", 2)
end,
}) and U.cmd_executable("curl", {
[false] = function()
vim.notify("curl not installed, gen disabled", 2)
end,
})
end,
opt = { show_model = true },
keys = {
{
"<leader>xx",
"<cmd>Gen Generate<cr>",
desc = "Input and generate",
mode = { "n", "i", "v", "x" },
},
{
"<leader>xx",
"<cmd>Gen Enhance_Code<cr>",
desc = "Enhance selected code",
mode = { "v", "x" },
},
{
"<leader>xm",
"<cmd>Gen<cr>",
desc = "Show Menu",
mode = { "n", "i", "v", "x" },
},
},
}

View file

@ -27,8 +27,8 @@ U.keymaps({
end,
desc = "Find Scratches",
},
{ "<leader>s", "<Nop>", desc = "Scratch File" },
["<leader>ss"] = {
{
"<leader>ss",
function()
scratch(".txt")
end,