Commit Graph

32 Commits

Author SHA1 Message Date
Maxime Coste
57a03d8495 Remove redundant forward declaration 2015-06-01 18:33:08 +01:00
Maxime Coste
993e842fdf Retreat ! go back to C++11 only code
This reverts commit b42de85031.
2015-05-26 18:42:09 +01:00
Maxime Coste
b42de85031 Migrate code to c++14 2015-05-25 13:51:17 +01:00
Maxime Coste
045272ab8a Use a struct for BufferRange rather than std::pair 2015-04-23 21:38:45 +01:00
Maxime Coste
1cec8df45e ArrayView content is not const anymore
As in upcoming std c++ array_view, ArrayView<T> points to mutable
data, use ArrayView<const T> or alias ConstArrayView<T> for const
data.
2015-03-09 13:54:09 +00:00
Maxime Coste
6c65c5e080 Add docstrings to highlighters, displayed by addhl help 2015-02-19 13:54:03 +00:00
Maxime Coste
295a97f2a6 Rename memoryview to ArrayView 2015-01-06 13:43:37 +00:00
Maxime Coste
b0fef1a962 Rename id_map to IdMap 2014-12-23 22:51:00 +00:00
Maxime Coste
fb611e2f62 Use an id_map directly for HighlighterRegistry rather than the FunctionRegistry class 2014-12-23 22:15:53 +00:00
Maxime Coste
ebecd60eb8 Rework hashing, use a more extensible framework similar to n3876 proposal
std::hash specialization is a pain to work with, stop using that, and
just specialize a 'size_t hash_value(const T&)' free function.
2014-12-16 18:57:19 +00:00
Maxime Coste
def4221ac7 Pass a BufferRange to highlighters, fix subregions
Regions highlighter can now correctly be applied to only subrange
of the buffer, fixing some corner cases in recursive regions.
2014-12-02 19:56:17 +00:00
Maxime Coste
2213f98176 Add virtual destructor to Highlighter 2014-10-25 10:40:26 +01:00
Maxime Coste
b2e90fe21e Refactor highlighters, use an interface with virtual methods 2014-10-22 13:54:03 +01:00
Maxime Coste
479c31b571 Replace FunctionGroup template with HighlighterGroup class 2014-06-10 19:58:02 +01:00
Maxime Coste
5cffc48efc Pass a HighlightFlags parameter to highlighters
When only highlighting for finding character position on screen
pass HighlightFlags::MoveOnly so that non moving highlighters do
not need to run.
2014-01-18 01:59:37 +00:00
Maxime Coste
e6884f989c Style changes, replace typedefs with usings 2014-01-09 19:59:26 +00:00
Maxime Coste
d1ac813f61 Pass a Context rather than a Window to highlighters 2013-12-16 23:24:08 +00:00
Maxime Coste
45d5dbcc85 Add support for defining and referencing highlighters
* defhl <name> defines a shared highlighter
* addhl -def-group <name> adds highlighters to the defined highlighter
* addhl ref <name> add the defined highlighter to the window's ones
2013-12-03 22:07:23 +00:00
Maxime Coste
d880465f38 Do not pass a window to highlighters factories 2013-11-28 18:48:40 +00:00
Maxime Coste
eedd37c09a memoryview: always pass by value 2013-07-26 01:50:36 +02:00
Maxime Coste
81ce4e4720 pass window param to highlighters 2013-05-29 18:58:20 +02:00
Maxime Coste
270e950cf1 sort includes directives 2013-04-09 20:05:40 +02:00
Maxime Coste
6c2430ce08 FlagLines updates the lines in the option according to buffer modifications 2013-03-31 14:53:32 +02:00
Maxime Coste
251f09ff89 Merge {Filter,Highlighter}Group in a FunctionGroup template 2013-03-27 13:45:22 +01:00
Maxime Coste
fb7234544e HighlightersFactories takes back a Window parameter 2013-03-06 14:27:33 +01:00
Maxime Coste
d23694e31f Do not use a factory for window builtins highlighters
This helps cleanup up the code, as factories no longer takes
a window as parameter.
2013-03-01 19:15:05 +01:00
Maxime Coste
d2f811a8d5 Refactor filter and highlighter registry into a common template 2012-11-23 13:40:20 +01:00
Maxime Coste
9337938403 replace std::string references with String 2012-04-14 01:17:09 +00:00
Maxime Coste
0483e951ad use memoryview instead of std::vector where applicable 2012-02-03 19:14:35 +00:00
Maxime Coste
5092456186 Highlighters: move HighlighterParameters definition from highlighter_registry.hh to highlighter.hh 2012-01-15 13:44:16 +00:00
Maxime Coste
50ce3d1549 Document some Kakoune concepts, as Window, Buffer, DisplayAtom... 2012-01-11 14:21:58 +00:00
Maxime Coste
0859b20bcf Rename Filter to Highlighter to be more explicit 2011-11-29 22:37:20 +00:00