garymjr / nvim-snippets

Snippet support using native neovim snippets
MIT License
215 stars 13 forks source link

Bug with custom `search_paths` #33

Closed dpetka2001 closed 3 months ago

dpetka2001 commented 3 months ago

After the merge of #31 a custom search paths like search_paths = { vim.fn.stdpath("config") .. "/misc/snippets" } causes an error

lazy.nvim Failed to run `config` for nvim-snippets

vim/fs.lua:0: invalid value (table) at index 2 in table for 'concat'

# stacktrace:
  - vim/fs.lua:0 _in_ **joinpath**
garymjr commented 3 months ago

I can't seem to reproduce this.

dpetka2001 commented 3 months ago

Oh, does that PR mean we don't have to specify a package.json any more? I deleted the file I had previously to define the paths and the error doesn't occur now.

For reference, this is my file structure for snippets in my dotfiles.

garymjr commented 3 months ago

Correct. We read the package.json for friendly-snippets. For everything else we use file/folder name to determine what language the snippets should be included.

dpetka2001 commented 3 months ago

I see. Thank you very much for the clarification and apologies for the false alarm.