From 330074f016a2d1a24e90981320b63cd4a44bc2b1 Mon Sep 17 00:00:00 2001 From: Jonas Widen Date: Sun, 16 Mar 2025 21:06:51 +0100 Subject: [PATCH] Clean up --- lua/gemini/init.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lua/gemini/init.lua b/lua/gemini/init.lua index dbf91d9..72aa3a6 100644 --- a/lua/gemini/init.lua +++ b/lua/gemini/init.lua @@ -24,10 +24,8 @@ function M.query(prompt, context) chat.set_context(context) chat.create_window() - -- Don't add the thinking message to conversation history local initial_content = "User: " .. prompt .. "\n\nAssistant: Thinking..." - chat.update_content(initial_content, true, true) -- Add new parameter to indicate temporary content - vim.cmd('redraw') + chat.update_content(initial_content, true, true) api.get_response(prompt, context, function(response, error) if error then @@ -41,13 +39,9 @@ function M.query(prompt, context) end function M.setup(opts) - -- Configure the plugin config.setup(opts) - - -- Ensure markdown parser is installed pcall(vim.treesitter.language.require_language, "markdown") - -- Create commands vim.api.nvim_create_user_command("Gemini", function(opts) if opts.args == "" then vim.notify("Please provide a prompt for Gemini.", vim.log.levels.WARN) @@ -68,7 +62,6 @@ function M.setup(opts) desc = "Clear Gemini chat history" }) - -- Set up default keymaps vim.keymap.set("n", "gc", function() M.prompt_query() end, { desc = "Chat with Gemini AI" })