diff --git a/lua/plugins/gen-ollama.lua b/lua/plugins/gen-ollama.lua new file mode 100644 index 0000000..14b18bc --- /dev/null +++ b/lua/plugins/gen-ollama.lua @@ -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 = { + { + "xx", + "Gen Generate", + desc = "Input and generate", + mode = { "n", "i", "v", "x" }, + }, + { + "xx", + "Gen Enhance_Code", + desc = "Enhance selected code", + mode = { "v", "x" }, + }, + { + "xm", + "Gen", + desc = "Show Menu", + mode = { "n", "i", "v", "x" }, + }, + }, +} diff --git a/lua/tools/scratch-files.lua b/lua/tools/scratch-files.lua index 56d8a4a..988e5e4 100644 --- a/lua/tools/scratch-files.lua +++ b/lua/tools/scratch-files.lua @@ -27,8 +27,8 @@ U.keymaps({ end, desc = "Find Scratches", }, - { "s", "", desc = "Scratch File" }, - ["ss"] = { + { + "ss", function() scratch(".txt") end,