fix issue
This commit is contained in:
parent
6b2b0c377a
commit
0505f0fb7f
2 changed files with 39 additions and 2 deletions
37
lua/plugins/gen-ollama.lua
Normal file
37
lua/plugins/gen-ollama.lua
Normal 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" },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -27,8 +27,8 @@ U.keymaps({
|
|||
end,
|
||||
desc = "Find Scratches",
|
||||
},
|
||||
{ "<leader>s", "<Nop>", desc = "Scratch File" },
|
||||
["<leader>ss"] = {
|
||||
{
|
||||
"<leader>ss",
|
||||
function()
|
||||
scratch(".txt")
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue