Shatur / neovim-tasks

A statefull task manager focused on integration with build systems.
GNU General Public License v3.0
108 stars 10 forks source link

Add get_module_param function to retrieve value of module parameter #7

Closed nyquist-h closed 2 years ago

nyquist-h commented 2 years ago

Use case: show the currently selected cmake target in the status line.

For that I created a general get_module_param function, to retrieve the value of any parameter of a module, but I would also be fine with an other approach. Also, I am not sure if the implementation is fine - I have not done a lot in lua.

Would be glad to hear your thoughts on this.

Shatur commented 2 years ago

Not a fan of such API because you will have a notification if get_module_param won't be able to detect a module...

But you could use this function in your config without any problems.

nyquist-h commented 2 years ago

Ah, that didn't cross my mind. Thanks for the hint and fast reply. I added it to my config, it works.

Shatur commented 2 years ago

Great, I will close it then.