Exafunction / codeium.vim

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

Language server failed - read /xxx/yyy: is a directory #393

Closed ecerulm closed 1 week ago

ecerulm commented 1 week ago

After setting

vim.g.codeium_log_file = "~/codeium.log"
vim.g.codeium_log_level = "DEBUG"

in my init.lua I can see the following on my ~/codeium.log:


F0618 12:47:02.797287 80225 main.go:555] Language server failed - read /Users/rubelagu/dotfiles/neovim/: is a directory
(1) attached stack trace
  -- stack trace:
  | github.com/Exafunction/Exafunction/exa/language_server.CreateLanguageServerAndServe
  |     exa/language_server/server.go:167
  | main.main
  |     exa/cmd/language_server/main.go:553
  | runtime.main
  |     GOROOT/src/runtime/proc.go:267
Wraps: (2) attached stack trace
  -- stack trace:
  | github.com/Exafunction/Exafunction/exa/language_server.initServers
  |     exa/language_server/server.go:538
  | github.com/Exafunction/Exafunction/exa/language_server.CreateLanguageServerAndServe
  |     exa/language_server/server.go:165
  | main.main
  |     exa/cmd/language_server/main.go:553
  | runtime.main
  |     GOROOT/src/runtime/proc.go:267
Wraps: (3) attached stack trace
  -- stack trace:
  | github.com/Exafunction/Exafunction/exa/language_server/code_tracker.NewCodeTrackerManager
  |     exa/language_server/code_tracker/code_tracker_manager.go:129
  | [...repeated from below...]
Wraps: (4) attached stack trace
  -- stack trace:
  | github.com/Exafunction/Exafunction/exa/language_server/code_tracker.(*CodeTrackerManager).initialize
  |     exa/language_server/code_tracker/code_tracker_manager.go:282
  | github.com/Exafunction/Exafunction/exa/language_server/code_tracker.NewCodeTrackerManager
  |     exa/language_server/code_tracker/code_tracker_manager.go:128
  | github.com/Exafunction/Exafunction/exa/language_server/completion_provider.NewSessionRouter
  |     exa/language_server/completion_provider/session_router.go:83
  | github.com/Exafunction/Exafunction/exa/language_server.initServers
  |     exa/language_server/server.go:530
  | github.com/Exafunction/Exafunction/exa/language_server.CreateLanguageServerAndServe
  |     exa/language_server/server.go:165
  | main.main
  |     exa/cmd/language_server/main.go:553
  | runtime.main
  |     GOROOT/src/runtime/proc.go:267
  | runtime.goexit
  |     src/runtime/asm_amd64.s:1650
Wraps: (5) read /Users/rubelagu/dotfiles/neovim/
Wraps: (6) is a directory
Error types: (1) *withstack.withStack (2) *withstack.withStack (3) *withstack.withStack (4) *withstack.withStack (5) *fs.PathError (6) syscall.Errno

Exception: Server port has not been properly initialized. [function <SNR>65_SendHeartbeat[2]..codeium#server#Request, line 2]
Exception: Server port has not been properly initialized. [function <SNR>65_SendHeartbeat[2]..codeium#server#Request, line 2]

I don't get any suggestion either, I guess since it can't start the language server.

I'm not sure where is getting the /Users/rubelagu/dotfiles/neovim/ that directory is where my init.lua resides but I don't know why it's trying to start with that, the file I have open is ~/tmp/test.py. (Although it does not matter where I start or what file I open, I get the same error)

ecerulm commented 1 week ago

well, I deleted ~/.codeium and try again and after a couple of restart of neovim and the message is gone.

But I guess this is still an issue.

pqn commented 1 week ago

Why codeium tried to do anything with /Users/rubelagu/dotfiles/neovim?

I assume you are editing your dotfiles within neovim?

codeium.nvim should print something using :echom or so when the language server cannot be started

I agree it should be more obvious. Feel free to open a PR with what you would recommend.

This issue is a duplicate of #376 which is now resolved.