Open axrt opened 3 years ago
Just curious, aren't there a lot of other plugins with print statements? How do you handle those?
Very good question indeed.. I think the difference here might be stemming from that most plugins do print out, it's not happening during the initialization though.
Hi! First of all, thank you for the plugin, it is very very helpful. I would greatly appreciate if you choose to accept this tiny contribution. Please consider the description below:
Description of the problem at hand
Whenever I start neovim in headless mode (using the
--headless
flag), this plugin is loaded, and, due to the fact that not all of my repos have any bookmarks what so ever, sometimes I get the "No bookmakrs!" output fromlua/telescope/_extensions/vim_bookmarks.lua:102
in the base; This may or may not mess up my downstream scripts if those happen to make use of the output printed by neovim;Proposed mitigation
As suggested by lines 101-104 in
lua/telescope/_extensions/vim_bookmarks.lua
from the cl, check if neovim is being launched in headless mode, if not - allow the warning print, block if otherwise; the check is done throughnvim_list_uis
, which returns empty (nil
-table) in case ofheadless
mode;Thank you for reviewing!