supermaven-inc / supermaven-nvim

The official Neovim plugin for Supermaven
https://supermaven.com/
MIT License
279 stars 16 forks source link

Error running config for nvim-snippets: attempt to call field ‘joinpath’ (a nil value) #43

Open jesuspoleosmu opened 1 month ago

jesuspoleosmu commented 1 month ago

Hello,

I am experiencing an issue when trying to configure supermaven-nvim. Upon starting Neovim, I receive the following error:

Failed to run `config` for nvim-snippets

...hare/nvim/lazy/nvim-snippets/lua/snippets/utils/init.lua:155: attempt to call field 'joinpath' (a nil value)

# stacktrace:
  - /supermaven-nvim/lua/supermaven-nvim/init.lua:48 _in_ **setup**
  - ~/.config/nvim/lua/plugins/supermaven.lua:5 _in_ **config**
  - ~/.config/nvim/lua/config/lazy.lua:9
  - ~/.config/nvim/init.lua:2

My current configuration is as follows:

lua/plugins/supermaven.lua

return {
  {
    "supermaven-inc/supermaven-nvim",
    config = function()
      require("supermaven-nvim").setup({})
    end,
  },
}

It seems that the issue is related to the joinpath function, which is either unavailable or not correctly defined in the file ...hare/nvim/lazy/nvim-snippets/lua/snippets/utils/init.lua.

I have tried updating all my plugins and reviewing the documentation, but the issue persists. Could you please assist me in resolving this problem or provide guidance on how to fix it?

Thank you in advance for your help.

AlejandroSuero commented 1 month ago

Supermaven does not use joinpath. At line 48 it's only checking for cmp.

https://github.com/supermaven-inc/supermaven-nvim/blob/5283a6c57fb69ceff7505b1a2267714bda0dafa0/lua/supermaven-nvim/init.lua#L47-L49

Heres what I found in nvim-snippets using joinpath:

sm-victorw commented 3 weeks ago

As @AlejandroSuero mentions, we don't use joinpath anywhere in the code, it seems that the line resulting in this error is just attempting to run require("cmp"). Elsewhere in your Neovim config, do you set up nvim-cmp?