m4xshen / hardtime.nvim

Establish good command workflow and quit bad habit
MIT License
1.38k stars 26 forks source link

Add `plenary` requirement to `README.md` #28

Closed rosingrind closed 1 year ago

rosingrind commented 1 year ago

There's a nui dependency listed (and my instance of nvim runs totally fine without it?) and no specific plenary mention (and my instance crashes without it being mentioned as dependency)

https://github.com/m4xshen/hardtime.nvim/blob/ae77f33070fcb376772c43a2a4871d077fb3e864/README.md?plain=1#L64

m4xshen commented 1 year ago

The nui is required when you run :Hardtime report. As for plenary, I didn't use it in this plugin. I'll need to figure out why this error happens.

m4xshen commented 1 year ago

Can you provide the screenshot of the crash messages?

rosingrind commented 1 year ago

The nui is required when you run :Hardtime report

I didn't know this, as I didn't run it once, pardon my ignorance.

crash messages

I use lazy.nvim, the plugin is not loaded on-demand, my opts are:

opts = {
    notification = false,
    hint = true,
    disable_mouse = false,
}

To reproduce the issue, you need to:

  1. Enable hints via hint = true
  2. Trigger a hint (e.g. press l and then i)
Error executing  vim.on_key Lua callback: vim/_editor.lua:0: Error executing 'on_key' with ns_ids '2'
    Messages: ...local/share/nvim/lazy/hardtime.nvim/lua/hardtime/log.lua:172: module 'plenary.path' not found:
        no field package.preload['plenary.path']
cache_loader: module plenary.path not found
cache_loader_lib: module plenary.path not found
        no file './plenary/path.lua'
        no file '/opt/homebrew/share/luajit-2.1.0-beta3/plenary/path.lua'
        no file '/usr/local/share/lua/5.1/plenary/path.lua'
        no file '/usr/local/share/lua/5.1/plenary/path/init.lua'
        no file '/opt/homebrew/share/lua/5.1/plenary/path.lua'
        no file '/opt/homebrew/share/lua/5.1/plenary/path/init.lua'
        no file './plenary/path.so'
        no file '/usr/local/lib/lua/5.1/plenary/path.so'
        no file '/opt/homebrew/lib/lua/5.1/plenary/path.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './plenary.so'
        no file '/usr/local/lib/lua/5.1/plenary.so'
        no file '/opt/homebrew/lib/lua/5.1/plenary.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'error'
        vim/_editor.lua: in function <vim/_editor.lua:0>
Screenshot 2023-08-14 at 8 18 17 AM
m4xshen commented 1 year ago

I found the issue. The log.lua requires plenary. Thanks a lot!