chore(nvim): Better keymaps & removed unused plugins

This commit is contained in:
Pratik Tripathy
2024-12-15 21:49:59 +05:30
parent 80fdf243e3
commit c9b1826541
6 changed files with 54 additions and 330 deletions

View File

@@ -1,32 +1,3 @@
return {
{
"David-Kunz/gen.nvim",
opts = {
model = "mistral:instruct", -- The default model to use.
host = "127.0.0.1", -- The host running the Ollama service.
port = "11434", -- The port on which the Ollama service is listening.
display_mode = "split", -- The display mode. Can be "float" or "split".
show_prompt = true, -- Shows the Prompt submitted to Ollama.
show_model = true, -- Displays which model you are using at the beginning of your chat session.
quit_map = "q", -- set keymap for quit
no_auto_close = false, -- Never closes the window automatically.
init = function()
pcall(io.popen, "ollama serve > /dev/null 2>&1 &")
end,
-- Function to initialize Ollama
command = function(options)
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
end,
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
-- This can also be a command string.
-- The executed command must return a JSON object with { response, context }
-- (context property is optional).
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
debug = false, -- Prints errors and the command which is run.
},
keys = {
{ "<leader>[", ":Gen<cr>", desc = "AI Prompt", mode = { "n" } },
{ "<leader>]", ":'<,'>Gen<cr>", desc = "Contextual AI Prompt", mode = { "v" } },
},
},
-- TODO: Use similar keymaps to Windsurf
}