echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.47k stars 175 forks source link

feat(deps): react to `vim.loop.cpu_info` returning `nil` #900

Closed lrntgr closed 1 month ago

lrntgr commented 1 month ago

Problem

When running Neovim in a Termux environment, the vim.loop.cpu_info function is returning nil.
Hence, running DepsUpdate fails with a attempt to get length of a nil value message.

Solution

Ensure that vim.loop.cpu_info() is returning a table before getting its length: if not a table, use 1 as a fallback value of number of processors.

echasnovski commented 1 month ago

Thanks for the PR!

This is interesting behavior. I'll resolve this probably tomorrow.


How is developing on Termux? Is is snappy enough with 'mini.nvim'?

lrntgr commented 1 month ago

Thanks for the PR!

This is interesting behavior. I'll resolve this probably tomorrow.

How is developing on Termux? Is is snappy enough with 'mini.nvim'?

I think 'mini.nvim' is a good fit for Termux: minimal but powerful, I love it (mini.pick in particular)!
I've not been disturbed by latency issues so far, but at this point my config is pretty simple (no LSP for instance). The limitation is more about the small screen and the keyboard.

echasnovski commented 1 month ago

This should now be resolved on latest main. Thanks for the PR and interesting use case!

lrntgr commented 1 month ago

This should now be resolved on latest main. Thanks for the PR and interesting use case!

Great, thanks @echasnovski for your awesome work.