connordeckers / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim

Home Page:https://www.codeium.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codeium


Discord Twitter Follow License

Visual Studio JetBrains Open VSX Google Chrome

codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim

Codeium autocompletes your code with AI in all major IDEs. We launched this implementation of the Codeium plugin for Vim and Neovim to bring this modern coding superpower to more developers. Check out our playground if you want to quickly try out Codeium online.

Contributions are welcome! Feel free to submit pull requests and issues related to the plugin.


Example


πŸš€ Getting started

  1. Install Vim (at least 9.0.0185) or Neovim (at least 0.6)

  2. Install Exafunction/codeium.vim using your vim plugin manager of choice, or manually. See Installation Options below.

  3. Run :Codeium Auth to set up the plugin and start using Codeium.

You can run :help codeium for a full list of commands and configuration options, or see this guide for a quick tutorial on how to use Codeium.

πŸ› οΈ Configuration

πŸ–₯️ For Vim users

Codeium can be disabled for particular filetypes by setting the g:codeium_filetypes variable in your vim config file (vimrc/init.vim):

let g:codeium_filetypes = {
    \ "bash": v:false,
    \ "typescript": v:true,
    \ }

Codeium is enabled by default for most filetypes.

You can also disable codeium by default with the g:codeium_enabled variable:

let g:codeium_enabled = v:false

For a full list of configuration options you can run :help codeium.

πŸ’» For Neovim users

You can use the following Lua code to invoke the Vimscript function for autocompletion by this plugin:

vim.fn["codeium#Accept"]()

Since this function returns an expression, we need to specify it explicitly using { expr = true }. Here is a working example for both wbthomason/packer.nvim and folke/lazy.nvim:

-- Remove the `use` here if you're using folke/lazy.nvim.
use {
  'Exafunction/codeium.vim',
  config = function ()
    -- Change '<C-g>' here to any keycode you like.
    vim.keymap.set('i', '<C-g>', function ()
      return vim.fn['codeium#Accept']()
    end, { expr = true })
  end
}

(Make sure that you ran :Codeium Auth after installation.)

πŸ’Ύ Installation Options

πŸ”Œ vim-plug

Plug 'Exafunction/codeium.vim'

πŸ“¦ Vundle

Plugin 'Exafunction/codeium.vim'

πŸ“¦ packer.nvim:

use 'Exafunction/codeium.vim'

πŸ’ͺ Manual

πŸ–₯️ Vim

Run the following. On windows, you can replace ~/.vim with $HOME/vimfiles:

git clone https://github.com/Exafunction/codeium.vim ~/.vim/pack/Exafunction/start/codeium.vim

πŸ’» Neovim

Run the following. On windows, you can replace ~/.config with $HOME/AppData/Local:

git clone https://github.com/Exafunction/codeium.vim ~/.config/nvim/pack/Exafunction/start/codeium.vim

About

Free, ultrafast Copilot alternative for Vim and Neovim

https://www.codeium.com/

License:MIT License


Languages

Language:Vim Script 100.0%