nvim-neorocks / rocks-config.nvim

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

[Feature]: health check #27

Open vhyrro opened 3 months ago

vhyrro commented 3 months ago

rocks-config should have a :checkhealth integration that checks general configuration bits and bobs.

tarcisioe commented 2 months ago

I'd like to tackle this, since we already have health.lua now. Are there any other checks you would suggest? One that comes to mind is checking if config.plugins_dir exists. Any others?

mrcjkb commented 2 months ago

I would say a non-existent config.plugins_dir would be a warning, since it just means rocks-config.nvim is installed, but not doing anything.

Another check could be to validate the rocks.toml entry for this plugin against a schema, similar to how we do in rocks.nvim for vim.g.rocks_nvim

tarcisioe commented 2 months ago

Oh nice. Is there any good way we could maybe share the code for doing checks between the plugins? Especially get_unrecognized_keys. Or maybe should I just go the simple way and duplicate that code here?

mrcjkb commented 2 months ago

I like the idea. We could extract a health-lib.nvim library with utilities. If you want to take that on @tarcisioe, we could invite you to the neorocks org 😃

tarcisioe commented 2 months ago

I'm somewhat new to developing Lua modules/libraries but I guess I can take a look on how other things are setup, so it's fine by me!