#ifndef filter_registry_h_INCLUDED #define filter_registry_h_INCLUDED #include #include #include "filter.hh" #include "utils.hh" #include "completion.hh" #include "memoryview.hh" #include "idvaluemap.hh" namespace Kakoune { class Window; typedef memoryview FilterParameters; typedef std::function FilterFactory; class FilterRegistry : public Singleton { public: void register_factory(const std::string& name, const FilterFactory& factory); void add_filter_to_window(Window& window, const std::string& factory_name, const FilterParameters& parameters); CandidateList complete_filter(const std::string& prefix, size_t cursor_pos); private: idvaluemap m_factories; }; } #endif // filter_registry_h_INCLUDED