Commit Graph

250 Commits

Author SHA1 Message Date
Maxime Coste
3ddc6eccda Add sanity check 2016-07-15 20:26:58 +01:00
Maxime Coste
1834a67b87 Go back to libc locale and use c_regex_traits
Unfortunately, cygwin does not support c++ locales.
2016-05-19 21:45:23 +01:00
Maxime Coste
84f62e6ff2 Use C++ locale based functions instead of the libc ones 2016-05-11 09:49:45 +01:00
Maxime Coste
abac6a9436 Use boost::wregex implementation and manually utf8 decode into it
That way we get proper unicode support in regular expressions as long
as the current locale treats wchar_t as unicode codepoints.

Fixes #638
Fixes #595
Fixes #162
2016-05-10 09:38:21 +01:00
pierroelmito
3044eff356 fix whitespace label
The author of this work hereby waives all claim of copyright (economic and moral) in this work and immediately places it in the public domain; it may be used, distorted or destroyed in any manner whatsoever without further attribution or notice to the creator
2016-04-30 11:59:53 +02:00
pierroelmito
d4b8e28d0a add face to change whitespace colors 2016-04-30 10:35:25 +02:00
Maxime Coste
013519b3cb Remove iterator based regex constructor 2016-04-16 21:41:04 +01:00
Maxime Coste
b5a68307ba Use a specific option type completions for insert completion
Fix escaping in jedi.kak as well
2016-04-04 13:42:58 +01:00
Maxime Coste
3a699c8ac3 Include tweak 2016-03-14 13:41:20 +00:00
Maxime Coste
9e15181dc9 Rework container helpers, use pipe syntax and cleanup implementation
use 'container | filter(func) | reverse() | transform(func)' instead
of 'transform(reverse(filter(container), func), func)' to express
container transformations.
2016-03-08 21:35:56 +00:00
Frank LENORMAND
ffde7e4787 Fix the name of ranges highlighters upon initialization 2016-01-16 21:12:01 +02:00
Maxime Coste
1d748a4017 Pass flags to the regex engine to correct anchors
Current behaviour was matching ^ $ for the current search start/end
(and \b was always matching begin/end as well).

Fixes #536
2015-12-23 22:20:25 +00:00
Maxime Coste
8dcffd8f5a Initial, WIP spelling implementation
Add a ranges highlighter that takes a timestamped list of ranges and
associated face. Add a spell.kak file that uses aspell pipe interface
to fill a range-faces option.
2015-12-17 04:07:49 +00:00
Maxime Coste
ac5bc7e95d Add missing erasing of invalid line flags 2015-12-15 02:22:29 +00:00
Maxime Coste
b6105fa106 Use markup for line-flags instead of a single face 2015-12-12 23:16:07 +00:00
Maxime Coste
4cb74623bb Store the buffer timestamp in line flags options respect it for highlighting
Option content is auto updated to match current buffer, so that line flags
are updated according to buffer modifications.
2015-12-12 11:45:45 +00:00
Maxime Coste
5b9d30c088 Optimize the dynregex case where the expression refers directly to a regex option 2015-12-12 06:50:58 +00:00
Maxime Coste
b4df57d369 Small cleanups 2015-11-27 13:50:40 +00:00
Maxime Coste
de72c7d5d3 Add missing <cstdio> include
Fixes #498
2015-11-26 22:51:39 +00:00
Maxime Coste
9b8e2526f9 Merge search hihglighter and regex option highlighter in dynregex 2015-11-09 09:34:03 +00:00
Maxime Coste
62c981fe2d Small tweak in DynamicRegexHighlighter 2015-11-09 08:50:17 +00:00
Maxime Coste
a2d78941ba Catch expression evaluation errors in line/column highlighters 2015-11-09 08:42:40 +00:00
Maxime Coste
e51ef6c3c2 Wrap the shell params en env vars in a ShellContext struct 2015-10-22 13:48:57 +01:00
Maxime Coste
2cd0ce41ac Do not try to extend last match when updating regex matches
It does not work well with regexes starting with a lookbehind, as
we would need to reparse from further away, leading to the last
match just being removed. It seems safer not to remove it, as
the motivating use case (multiline macros) is better left to
regions anyway.

Fixes #440
2015-10-18 11:37:04 +01:00
Maxime Coste
3262a6902c Allow custom separator for line numbers
the number_lines highlighter accepts a -separator <arg> switch
to change the default '│' separator.

Fixes #295
2015-09-25 13:47:57 +01:00
Maxime Coste
aa4b98af7c Add utf8::read_codepoint that both gets the codepoint and advance iterator 2015-09-24 23:00:47 +01:00
Maxime Coste
12ef466f3a Avoid redundant calls to get_face in highlight_selections 2015-09-24 13:55:06 +01:00
Maxime Coste
693d9a4861 Store key hash in IdMap 2015-09-16 20:02:12 +01:00
Maxime Coste
ae720b90b1 Small code tweak in show_whitespaces highlighter 2015-09-04 13:47:16 +01:00
Maxime Coste
dc504284c3 Change flag lines highlighter to use faces instead of colors
Fixes #130
2015-08-23 12:13:14 +01:00
Maxime Coste
1af82e2e24 Tweak regex constructor calls 2015-07-25 11:15:03 +01:00
Maxime Coste
2946504a17 Improve column highlighter to cooperate better with other highlighters
Fixes #268
2015-07-23 13:58:23 +01:00
Maxime Coste
17e3be48a5 Transform boost/std regex_error to Kakoune::regex_error at Regex construction
Fixes #318
2015-07-14 21:06:41 +01:00
Maxime Coste
1d1927647a Fix formatting 2015-07-09 13:53:21 +01:00
Maxime Coste
6870895374 Add support for hex formatting 2015-06-22 13:56:00 +01:00
Maxime Coste
2c15dbe6b2 Fix regions highlighter docstring 2015-06-11 19:04:30 +01:00
Maxime Coste
f19bb4fe6d Port more code to use the format function instead of adhoc string concat 2015-06-01 19:06:35 +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
7b7427e1a6 Add missing 'override' specifiers 2015-05-25 13:54:18 +01:00
Maxime Coste
b42de85031 Migrate code to c++14 2015-05-25 13:51:17 +01:00
Maxime Coste
0ee95d02c4 line highlighter highlights up to window's end 2015-05-05 20:21:17 +01:00
Maxime Coste
1a1db1cb3a {line,column}_option highlighters use an expanded string instead of an option name
That allows access to non option values, such as cursor_column or cursor_line with
:addhl line '%val{cursor_line}' default,rgb:404040

Fixes #38
2015-05-04 17:12:51 +01:00
Maxime Coste
7f0588c02c Dont use a regex to match face spec for regex highlighter 2015-05-03 18:22:49 +01:00
Maxime Coste
4e89cbfe83 Add a column_option highlighter that highlight a column given in an option 2015-04-30 19:18:20 +01:00
Maxime Coste
5bff742e0a Replace some String temporaries with StringViews 2015-04-27 16:46:57 +01:00
Maxime Coste
bbefde9379 Move Colors enum class as NamedColor enum inside Color struct 2015-04-25 10:47:39 +01:00
Maxime Coste
4e1ed13f25 Use a struct for RangeAndMatches 2015-04-23 21:44:20 +01:00
Maxime Coste
045272ab8a Use a struct for BufferRange rather than std::pair 2015-04-23 21:38:45 +01:00
Maxime Coste
e0f7a6f0be Remove simple_factory for highlighters 2015-04-23 20:27:52 +01:00
Maxime Coste
f714766854 Fix search highlighter wrong code 2015-04-19 15:19:39 +01:00