winston0410 / range-highlight.nvim

An extremely lightweight plugin (~ 120loc) that hightlights ranges you have entered in commandline.
MIT License
202 stars 5 forks source link

module 'cmd-parser' not found #16

Closed prdanelli closed 11 months ago

prdanelli commented 11 months ago

I'm getting the following error with Neovim 0.9:

./lazy/range-highlight.nvim/lua/range-highlight/init.lua:44: module 'cmd-parser' not found:
        no field package.preload['cmd-parser']
cache_loader: module cmd-parser not found
cache_loader_lib: module cmd-parser not found
        no file './cmd-parser.lua'
        no file '/opt/homebrew/share/luajit-2.1.0-beta3/cmd-parser.lua'
        no file '/usr/local/share/lua/5.1/cmd-parser.lua'
        no file '/usr/local/share/lua/5.1/cmd-parser/init.lua'
        no file '/opt/homebrew/share/lua/5.1/cmd-parser.lua'
        no file '/opt/homebrew/share/lua/5.1/cmd-parser/init.lua'
        no file './cmd-parser.so'
        no file '/usr/local/lib/lua/5.1/cmd-parser.so'
        no file '/opt/homebrew/lib/lua/5.1/cmd-parser.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'

# stacktrace:
  - /range-highlight.nvim/lua/range-highlight/init.lua:44
  - ~/.config/nvim/lua/plugins/range-highlight.lua:4 _in_ **config**
  - ~/.config/nvim/lua/lazynvim.lua:14
  - init.lua:6

Version info:

:version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.1/share/nvim"
olinpin commented 11 months ago

Just had the same problem, you need to add dependencies = "winston0410/cmd-parser.nvim", to your config. This is what my config looks like

return {
    "winston0410/range-highlight.nvim",
    dependencies = "winston0410/cmd-parser.nvim",
    config = function ()
        require("range-highlight").setup()
    end
}
prdanelli commented 11 months ago

Thank you for your help :)