home/src/highlighters.hh
Maxime Coste c4db46b58b Rename line-flags option type to line-specs
Generalize this option type, which is a timestamped list of
<line number>|<arbitrary string>. That way this type is not strongly
coupled with the flag-lines highlighter, and can be reused for other
use cases.
2017-05-24 15:41:43 +01:00

27 lines
654 B
C++

#ifndef highlighters_hh_INCLUDED
#define highlighters_hh_INCLUDED
#include "color.hh"
#include "highlighter.hh"
namespace Kakoune
{
void register_highlighters();
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);
using LineAndSpec = std::tuple<LineCount, String>;
using RangeAndString = std::tuple<InclusiveBufferRange, String>;
}
#endif // highlighters_hh_INCLUDED