Exafunction / codeium.vim

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

NeoVim - codeium#GetStatusString returns ON with space before it #278

Closed stankovictab closed 10 months ago

stankovictab commented 10 months ago

Status when it's on has a space before the first character, it messes up my status line config. image OFF seems to be perfectly fine. image If anyone else is experiencing this with lualine, here's a temporary fix.

local function codeium_status()
    local status = vim.fn["codeium#GetStatusString"]()
    print("Codeium Status:", status)
    if status == " ON" then
        return "ON"
    else
        return status
    end
end

-- ...

-- In lualine splits config 
lualine_y = { { 'filetype' }, { codeium_status, color = { fg = "#58f5ab" } } }
pqn commented 10 months ago

I think this is intended? This way the width is constant. Open to other suggestions.