#ifndef highlighter_registry_h_INCLUDED #define highlighter_registry_h_INCLUDED #include #include #include "highlighter.hh" #include "utils.hh" #include "completion.hh" namespace Kakoune { class Window; typedef std::vector HighlighterParameters; typedef std::function HighlighterFactory; class HighlighterRegistry : public Singleton { public: void register_factory(const std::string& name, const HighlighterFactory& factory); void add_highlighter_to_window(Window& window, const std::string& factory_name, const HighlighterParameters& parameters); CandidateList complete_highlighter(const std::string& prefix, size_t cursor_pos); private: std::unordered_map m_factories; }; } #endif // highlighter_registry_h_INCLUDED