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" })