First version of the plugin, supports also my custom show_documents switch