summaryrefslogtreecommitdiff
path: root/src/highlighter_group.hh
AgeCommit message (Collapse)Author
2025-07-08Replace std::unique_ptr with a custom implementationMaxime Coste
<memory> is a costly header we can avoid by just implementing UniquePtr ourselves, which is a pretty straightforward in modern C++, this saves around 10% of the compilation time here.
2024-04-12Introduce "local" scope in evaluate-commandsMaxime Coste
When using `eval` a new scope named 'local' gets pushed for the whole evaluation, this makes it possible to temporarily set an option/hook/alias... Local scopes nest so nested evals do work as expected. Remove the now trivial with-option command
2020-08-08Rename DefinedHighlighters to SharedHighlightersMaxime Coste
Matches the user facing name and seems more correct.
2020-03-30Add -override support to add-highlighterMaxime Coste
This allow replacing a highlighter in place, not loosing its current position in its parent. Fixes #3436
2018-07-05Refactor add-highlighter to make naming explicitMaxime Coste
The highlighter name must be given as part of the path of the highlighter, as the last element. Fixes #1712
2018-04-06Make compute_display_setup methods constMaxime Coste
2017-11-25Highlighters: Introduce unique highlighter supportMaxime Coste
Some highlighters, such as wrap or line numbers, are not intended to be used multiple times on the same display. Add support for unique ids that are used by highlighters to disable themselves if another unique highlighter with the same id is supposed to override them. The usual highlighter "precedence" takes, place, that it, that most nested highlighter will the the one to run (window in priority to buffer in priority to global).
2017-11-03Remove uneeded forward declarationMaxime Coste
2017-10-31Highlighters does not need to inherit from HighlighterGroupMaxime Coste
Just compose, to avoid coupling Highlighters with the Highlighter interface. And yeah, that naming is a bit confusing.
2017-10-28Move highlighters into ScopesMaxime Coste
That means we can now have highlighters active at global, buffer, and window scope. The add-highlighter and remove-highlighter syntax changed to take the parent path (scope/group/...) as a mandatory argument, superseeding the previous -group switch.
2017-05-07Move passes logic to the base Highlighter classMaxime Coste
Validate that childs of HighlighterGroup are matching its passes.
2017-05-07Make scrolling around work more correctly with wrappingMaxime Coste
2017-05-07Introduce highlighting phases and display setup computationMaxime Coste
Highlighters now run in 3 phases: Wrap, Move, and Colorize. That way we guarantee the wrap highlighter runs first, then eventual line numbers/flags, and finally the colorizers. We also run a `compute_display_setup` method thats responsible for computing the lines that will be displayed, eventually scrolling the view to ensure the cursor is visible.
2017-03-07Replace IdMap with HashMapMaxime Coste
2015-05-25Add missing 'override' specifiersMaxime Coste
2015-01-12Some more memory trackingMaxime Coste
2014-12-23Rename id_map to IdMapMaxime Coste
2014-12-02Pass a BufferRange to highlighters, fix subregionsMaxime Coste
Regions highlighter can now correctly be applied to only subrange of the buffer, fixing some corner cases in recursive regions.
2014-10-22Refactor highlighters, use an interface with virtual methodsMaxime Coste
2014-06-15Refactor highlighter command completionsMaxime Coste
2014-06-12Remove defhl, use addhl -groupMaxime Coste
2014-06-10Add HierachicalHighlighter classMaxime Coste
HierachicalHighlighter contains a map of names to HighlighterGroup and can wrap any highlighter that wants to access user settable sub groups.
2014-06-10Replace FunctionGroup template with HighlighterGroup classMaxime Coste
2013-03-27Merge {Filter,Highlighter}Group in a FunctionGroup templateMaxime Coste
2012-10-11use ByteCount instead of CharCount when we are really counting bytesMaxime Coste
(that is most of the time when we are not concerned with displaying)
2012-08-23use a strongly typed int CharCount for character countsMaxime Coste
2012-06-12Add a FilterGroup, and cleanup HighlighterGroupMaxime Coste
FilterGroup is similar to HighlighterGroup, it permits grouping together filters for easy removal.
2012-04-14replace std::string references with StringMaxime Coste
2012-01-19HighlighterGroup: use idvaluemap::complete_id_if in complete_group_idMaxime Coste
2012-01-19HighlighterGroup: move to it's own file, Window uses them directlyMaxime Coste