Exafunction / codeium.nvim

A native neovim extension for Codeium
MIT License
639 stars 50 forks source link

How to activate the chat? #162

Open StephanRoemer opened 3 months ago

StephanRoemer commented 3 months ago

Sorry for being dull, but how do I execute the chat?

mrheinen commented 3 months ago

Use:

:Codeium Chat

If you have enabled chat in the config.

DajmondFM commented 3 months ago

Hey I still cant use Chat function even after enabling it. return { "Exafunction/codeium.nvim", dependencies = { "nvim-lua/plenary.nvim", "hrsh7th/nvim-cmp", }, config = function() require("codeium").setup({ enable_chat=true, }) end } This is how my config of it looks like. Autocompletion works normaly but chat doesn't.

serxoz commented 2 months ago

I think I have the same problem.

Config:

  use {
      "Exafunction/codeium.nvim",
      requires = {
          "nvim-lua/plenary.nvim",
          "hrsh7th/nvim-cmp",
      },
      config = function()
          require("codeium").setup({
              enable_chat = true,
          })
      end
  }

And when I execute :Codeium Chat I get this error:

Error executing vim.schedule lua callback: .../site/pack/packer/start/codeium.nvim/lua/codeium/api.lua:404: attemp
t to concatenate field 'chatWebServerPort' (a nil value)
stack traceback:
        .../site/pack/packer/start/codeium.nvim/lua/codeium/api.lua:404: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
jkemp814 commented 2 months ago

codeium.lua file in ~/.config/nvim/lua/plugins folder:

return {
  {
    "Exafunction/codeium.nvim",
    requires = {
      "nvim-lua/plenary.nvim",
      "hrsh7th/nvim-cmp",
    },
    config = function()
      require("codeium").setup({
        enable_chat = true,
      })
    end,
  },
}
Error executing Lua callback: .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: Vim:Error executing Lua callback: .../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:150: attempt to concatenate upvalue 'port' (a nil value)
stack traceback:
    .../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:150: in function 'request'
    .../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:400: in function 'get_chat_ports'
    ....local/share/nvim/lazy/codeium.nvim/lua/codeium/init.lua:23: in function <....local/share/nvim/lazy/codeium.nvim/lua/codeium/init.lua:17>
    [C]: in function 'cmd'
    .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:16>
stack traceback:
    [C]: in function 'cmd'
    .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:16>

failed to add workspace: {"code":"unknown","message":"lstat /var/home/james/.gnupg/openpgp-revocs.d/C2E4D2627C40239BA6DCB564D2293329CCE26E41.rev: permission denied"}

127.0.0.1:44439?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&has_enterprise_extension=false&web_server_url=ws://127.0.0.1:40813&ide_name=neovim&ide_version=0.9.5&app_name=codeuim.nvim&extension_name=codeium.nvim&extension_version=1.8.25&ide_telemetry_enabled=true&has_index_service=false&locale=en_US: Failed to find default application for content type 'text/html'

jkemp814 commented 2 months ago

Couple screenshots after I got the server to run. Had to manually type URL from error message that overlaid on top of document as shown in the screenshot. Then pasted into Firefox browser.

Screenshot from 2024-04-17 21-29-33 Screenshot from 2024-04-17 21-30-20

jkemp814 commented 2 months ago

Screenshot from 2024-04-17 21-45-04

jkemp814 commented 2 months ago

How do I get the codeium.nvim plugin to find my browser? Is there some configuration needed?

I'm on Fedora Linux 39 Silverblue Firefox 125 pre-installed. Alacritty v0.13.2 (installed using cargo (rust)) Zellij v0.40.0 (installed using cargo (rust)) Neovim v0.9.5 (Fedora package manager) LazyVim v10.21.1 (GitHub)

I noticed when time to authorize Codeium Auth it doesn't open the browser also. I have to copy to clipboard, then paste in the URL to complete the process. So I believe the Codeium Chat would work if it could find the browser.

aliaksandr-trush commented 2 months ago

How do I get the codeium.nvim plugin to find my browser? Is there some configuration needed?

I'm on Fedora Linux 39 Silverblue Firefox 125 pre-installed. Alacritty v0.13.2 (installed using cargo (rust)) Zellij v0.40.0 (installed using cargo (rust)) Neovim v0.9.5 (Fedora package manager) LazyVim v10.21.1 (GitHub)

I noticed when time to authorize Codeium Auth it doesn't open the browser also. I have to copy to clipboard, then paste in the URL to complete the process. So I believe the Codeium Chat would work if it could find the browser.

The plugin uses xdg-open tool to open URL in a default browser. It might be that xdg-open does not work well for Fedora SilverBlue. Fount this issue that could be related https://github.com/containers/toolbox/issues/291

jkemp814 commented 2 months ago

Thanks, @aliaksandr-trush That does look related. I do have other packages that do the same thing.