Exafunction / codeium.vim

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

Got an error when installing with folke/lazy.nvim: `Vim:E154: Duplicate tag "g:codeium_filetypes" in file /Users` #5

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago
pqn commented 1 year ago

I think this has been fixed in #4, can you try updating?

nyngwang commented 1 year ago

Now I got another error:

   Error  07:14:59 notify.error lazy.nvim Failed to source `/Users/ningwang/.local/share/nvim/lazy/codeium.vim/plugin/codeium.vim`

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:346: /Users/ningwang/.config/nvim/init.lua..nvim_exec() called at 
/Users/ningwang/.config/nvim/init.lua:0../Users/ningwang/.local/share/nvim/lazy/codeium.vim/plugin/codeium.vim[55]..function codeium#server#Start, line 22: Vim(call):E739: Cannot create directory 
/Users/ningwang/.config/nvim/init.lua..nvim_exec() called at 
/Users/ningwang/.config/nvim/init.lua:0../Users/ningwang/.local/share/nvim/lazy/codeium.vim/bin: no such file or directory

# stacktrace:
  - .config/nvim/lua/plugins/init.lua:60
  - .config/nvim/init.lua:2

Maybe this is a problem with lazy.nvim, let me check for this there.

nyngwang commented 1 year ago

@pqn It seems that the problem is related to the fact that some folders are created as codeium.vim while some are codeium? Not sure.

juliosueiras commented 1 year ago

a fix would be to replace <sfile>:h:h to <script>:p:h:h in server.vim

nyngwang commented 1 year ago

a fix would be to replace <sfile>:h:h to [...]

Thank you :) I just confirmed it on my testing branch. Then I will wait for a PR, since I'm too lazy :P...

juliosueiras commented 1 year ago

btw, forgot to mention, :p:h:h will download the bin to autoload/bin so it need an extra :h to put it properly on the root level