nvim-neorocks / rocks-config.nvim

Allow rocks.nvim to help configure your plugins.
GNU General Public License v3.0
55 stars 2 forks source link

E5113: attempt to index field 'rocks' (a nil value) #49

Closed craigmac closed 1 month ago

craigmac commented 1 month ago

Using this rocks.toml file:

[plugins]
"rocks.nvim" = "2.32.0"
"rocks-git.nvim" = "1.5.1"
"rocks-config.nvim" = "2.1.0"

[plugins.nvim-treesitter]
git = "nvim-treesitter/nvim-treesitter"
rev = "v0.9.2^{}"

nvim-treesitter-context = "scm"
nvim-treesitter-textobjects = "scm"

[bundles.treesitter]
items = [
  "nvim-treesitter",
  "nvim-treesitter-context",
  "nvim-treesitter-textobjects"
]

Error, upon nvim start:

Error detected while processing /Users/craigmaceachern/.local/share/nvi
m/rocks/lib/luarocks/rocks-5.1/rocks.nvim/2.32.0-1/plugin/rocks.lua:
E5113: Error while calling lua chunk: ...share/nvim/rocks/rocks_rtp/lua
/rocks-config/internal.lua:221: attempt to index field 'rocks' (a nil v
alue)
stack traceback:
        ...share/nvim/rocks/rocks_rtp/lua/rocks-config/internal.lua:221
: in function 'f'
        /usr/local/share/nvim/runtime/lua/vim/iter.lua:625: in function
 'fn'
        /usr/local/share/nvim/runtime/lua/vim/iter.lua:633: in function
 'find'
        ...share/nvim/rocks/rocks_rtp/lua/rocks-config/internal.lua:220
: in function 'setup'
        ...rocks/rocks_rtp/lua/rocks-config/rocks/hooks/preload.lua:18:
 in function 'action'
        ...local/share/nvim/rocks/rocks_rtp/lua/rocks/api/hooks.lua:93:
 in function 'run_preload_hooks'
        .../luarocks/rocks-5.1/rocks.nvim/2.32.0-1/plugin/rocks.lua:61:
 in main chunk
craigmac commented 1 month ago

adding [rocks] to top of file seems to have fixed that, is this required now? I see examples without it

mrcjkb commented 1 month ago

adding [rocks] to top of file seems to have fixed that, is this required now? I see examples without it

This looks like a rocks-config.nvim bug