Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim
https://codeium.com
MIT License
4.12k stars 147 forks source link

Add new variable: `g:codeium_filetypes_disabled_by_default`. #252

Closed zArubaru closed 6 months ago

zArubaru commented 11 months ago

Enables finer control for when codeium is enabled by adding the g:codeium_filetypes_disabled_by_default variable.

It disables all filetypes by default, and makes it possible to use the g:codeium_filetypes variable to selectively enable codeium for specified filetypes:

" let g:codeium_enabled = v:true
let g:codeium_filetypes_disabled_by_default = v:true

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

An alternative way to handle this issue would be to make g:codeium_enabled = v:false respect g:codeium_filetypes, meaning i.e. if "rust" is v:true, then we start codeium for that buffer, even if codeium is disabled. I guess this alternative would be a breaking change.

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

zArubaru commented 6 months ago

@pqn And my apologies for the late resolve. Here you go :) I also added a slight edit to the README.md as a second commit.