From a78dca4d74a8ebc8695c344be63ad0380490c54f Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Thu, 7 Aug 2025 23:15:52 +0000
Subject: [PATCH] Refactor plugin to use Gemini API
This commit refactors the plugin to use the Gemini API instead of the Windsurf LLM API.
The language server dependency has been removed, and the authentication mechanism has been updated to use a Gemini API key. A new module for handling communication with the Gemini API has been implemented and integrated into the plugin's core logic.
The plugin has been renamed to "Gemini" to reflect the new backend, and all references to "Codeium" and "Windsurf" have been updated.
---
README.md | 158 ++++++++----------
autoload/codeium.vim | 33 ++--
autoload/codeium/command.vim | 202 ------------------------
autoload/codeium/log.vim | 60 -------
autoload/gemini.vim | 80 ++++++++++
autoload/gemini/command.vim | 126 +++++++++++++++
autoload/{codeium => gemini}/doc.vim | 14 +-
autoload/gemini/log.vim | 60 +++++++
autoload/{codeium => gemini}/server.vim | 92 +++++------
autoload/{codeium => gemini}/util.vim | 8 +-
codeium-simple-logo.svg | 1 -
doc/codeium.txt | 190 ----------------------
doc/gemini.txt | 146 +++++++++++++++++
plugin/{codeium.vim => gemini.vim} | 8 +-
test_vimrc | 12 ++
windsurf.png | Bin 135017 -> 0 bytes
16 files changed, 578 insertions(+), 612 deletions(-)
delete mode 100644 autoload/codeium/command.vim
delete mode 100644 autoload/codeium/log.vim
create mode 100644 autoload/gemini.vim
create mode 100644 autoload/gemini/command.vim
rename autoload/{codeium => gemini}/doc.vim (86%)
create mode 100644 autoload/gemini/log.vim
rename autoload/{codeium => gemini}/server.vim (78%)
rename autoload/{codeium => gemini}/util.vim (67%)
delete mode 100644 codeium-simple-logo.svg
delete mode 100644 doc/codeium.txt
create mode 100644 doc/gemini.txt
rename plugin/{codeium.vim => gemini.vim} (95%)
create mode 100644 test_vimrc
delete mode 100644 windsurf.png
diff --git a/README.md b/README.md
index 63a40f08..71bede92 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,8 @@
-
-
-
-
----
-
-[](https://discord.gg/3XFf78nAx5)
-[](https://twitter.com/intent/follow?screen_name=windsurf_ai)
-
-[](https://docs.windsurf.com)
-[](https://windsurf.canny.io/feature-requests/)
-[](https://windsurf.com?repo_name=exafunction%2Fwindsurf.vim)
-
-[](https://marketplace.visualstudio.com/items?itemName=Codeium.codeium)
-[](https://plugins.jetbrains.com/plugin/20540-codeium/)
-[](https://open-vsx.org/extension/Codeium/codeium)
-[](https://chrome.google.com/webstore/detail/codeium/hobjkcpmjhlegmobgonaagepfckjkceh)
-
-# windsurf.vim
+# Gemini.vim
_Free, ultrafast Copilot alternative for Vim and Neovim_
-Windsurf autocompletes your code with AI in all major IDEs. We [launched](https://www.windsurf.com/blog/codeium-copilot-alternative-in-vim) this implementation of the Windsurf plugin for Vim and Neovim to bring this modern coding superpower to more developers. Check out our [playground](https://www.windsurf.com/playground) if you want to quickly try out Windsurf online.
+Gemini autocompletes your code with AI in all major IDEs. We [launched](https://www.windsurf.com/blog/codeium-copilot-alternative-in-vim) this implementation of the Gemini plugin for Vim and Neovim to bring this modern coding superpower to more developers. Check out our [playground](https://www.windsurf.com/playground) if you want to quickly try out Gemini online.
Contributions are welcome! Feel free to submit pull requests and issues related to the plugin.
@@ -35,57 +17,57 @@ Contributions are welcome! Feel free to submit pull requests and issues related
1. Install [Vim](https://github.com/vim/vim) (at least 9.0.0185) or [Neovim](https://github.com/neovim/neovim/releases/latest) (at
least 0.6)
-2. Install `Exafunction/windsurf.vim` using your vim plugin manager of
+2. Install `Exafunction/gemini.vim` using your vim plugin manager of
choice, or manually. See [Installation Options](#-installation-options) below.
-3. Run `:Codeium Auth` to set up the plugin and start using Windsurf.
+3. Run `:Gemini Auth` to set up the plugin and start using Gemini.
-You can run `:help codeium` for a full list of commands and configuration
-options, or see [this guide](https://www.windsurf.com/vim_tutorial) for a quick tutorial on how to use Windsurf.
+You can run `:help gemini` for a full list of commands and configuration
+options, or see [this guide](https://www.gemini.com/vim_tutorial) for a quick tutorial on how to use Gemini.
## 🛠️ Configuration
-For a full list of configuration options you can run `:help codeium`.
+For a full list of configuration options you can run `:help gemini`.
A few of the most popular options are highlighted below.
### ⌨️ Keybindings
-Windsurf provides the following functions to control suggestions:
+Gemini provides the following functions to control suggestions:
| Action | Function | Default Binding |
| --------------------------- | ------------------------------ | --------------- |
-| Clear current suggestion | `codeium#Clear()` | `` |
-| Next suggestion | `codeium#CycleCompletions(1)` | `` |
-| Previous suggestion | `codeium#CycleCompletions(-1)` | `` |
-| Insert suggestion | `codeium#Accept()` | `` |
-| Manually trigger suggestion | `codeium#Complete()` | `` |
-| Accept word from suggestion | `codeium#AcceptNextWord()` | `` |
-| Accept line from suggestion | `codeium#AcceptNextLine()` | `` |
+| Clear current suggestion | `gemini#Clear()` | `` |
+| Next suggestion | `gemini#CycleCompletions(1)` | `` |
+| Previous suggestion | `gemini#CycleCompletions(-1)` | `` |
+| Insert suggestion | `gemini#Accept()` | `` |
+| Manually trigger suggestion | `gemini#Complete()` | `` |
+| Accept word from suggestion | `gemini#AcceptNextWord()` | `` |
+| Accept line from suggestion | `gemini#AcceptNextLine()` | `` |
-Windsurf's default keybindings can be disabled by setting
+Gemini's default keybindings can be disabled by setting
```vim
-let g:codeium_disable_bindings = 1
+let g:gemini_disable_bindings = 1
```
or in Neovim:
```lua
-vim.g.codeium_disable_bindings = 1
+vim.g.gemini_disable_bindings = 1
```
If you'd like to just disable the `` binding, you can alternatively
-use the `g:codeium_no_map_tab` option.
+use the `g:gemini_no_map_tab` option.
If you'd like to bind the actions above to different keys, this might look something like the following in Vim:
```vim
-imap