2011-11-29 23:37:20 +01:00
|
|
|
#ifndef highlighters_hh_INCLUDED
|
|
|
|
#define highlighters_hh_INCLUDED
|
|
|
|
|
2013-03-29 19:31:06 +01:00
|
|
|
#include "color.hh"
|
2013-04-09 20:05:40 +02:00
|
|
|
#include "highlighter.hh"
|
2017-05-25 09:38:11 +02:00
|
|
|
#include "option.hh"
|
2013-03-29 19:31:06 +01:00
|
|
|
|
2011-11-29 23:37:20 +01:00
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
void register_highlighters();
|
|
|
|
|
2017-05-08 13:34:57 +02:00
|
|
|
struct InclusiveBufferRange{ BufferCoord first, last; };
|
|
|
|
|
|
|
|
inline bool operator==(const InclusiveBufferRange& lhs, const InclusiveBufferRange& rhs)
|
|
|
|
{
|
|
|
|
return lhs.first == rhs.first and lhs.last == rhs.last;
|
|
|
|
}
|
|
|
|
String option_to_string(InclusiveBufferRange range);
|
|
|
|
void option_from_string(StringView str, InclusiveBufferRange& opt);
|
|
|
|
|
2017-05-24 16:41:43 +02:00
|
|
|
using LineAndSpec = std::tuple<LineCount, String>;
|
2017-05-25 09:38:11 +02:00
|
|
|
using LineAndSpecList = TimestampedList<LineAndSpec>;
|
|
|
|
|
|
|
|
constexpr StringView option_type_name(Meta::Type<LineAndSpecList>)
|
|
|
|
{
|
|
|
|
return "line-specs";
|
|
|
|
}
|
|
|
|
void option_update(LineAndSpecList& opt, const Context& context);
|
|
|
|
|
2017-05-17 20:35:54 +02:00
|
|
|
using RangeAndString = std::tuple<InclusiveBufferRange, String>;
|
2017-05-25 09:38:11 +02:00
|
|
|
using RangeAndStringList = TimestampedList<RangeAndString>;
|
|
|
|
|
|
|
|
constexpr StringView option_type_name(Meta::Type<RangeAndStringList>)
|
|
|
|
{
|
|
|
|
return "range-specs";
|
|
|
|
}
|
|
|
|
void option_update(RangeAndStringList& opt, const Context& context);
|
2013-03-29 19:31:06 +01:00
|
|
|
|
2011-11-29 23:37:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // highlighters_hh_INCLUDED
|