Commit Graph

57 Commits

Author SHA1 Message Date
Maxime Coste
0f292d343b Use a specific WrapMarker face for wrap highlighter wrapped line marker 2019-11-04 21:49:54 +11:00
Maxime Coste
229768841b Fix parsing of faces with a base but no attributes 2019-04-28 00:35:52 +01:00
Maxime Coste
4e24ba86cc Change faces alias to be a base that can be modified
Using <fg>,<bg>+<attr>@<base> will apply the given fg color,
bg color and attributes on top of base dynamically. Simply giving
<base> is a shorthand for default,default@<base>.

Inspired by the discussion in #2862
2019-04-23 23:15:23 +01:00
Olivier Perret
93f913705a Misc fixes 2018-09-24 09:54:21 +02:00
Maxime Coste
1631a7d8d9 Replace the Exclusive face attribute with Final
Final is more granular, it consists of FinalFg (f), FinalBg (g)
and FinalAttr (a) which control if a face's fg, bg, or attributes
fully overwrite the previous face (instead of merging) and if
following faces apply on top of this face or not.

Fixes #2388 if the Whitespace face has the FinalFg flag.
2018-09-23 23:27:14 +10:00
Maxime Coste
7cf3cbde8e Cleanup some trailing whitespaces and double semicolon 2018-07-26 21:56:34 +10:00
Frank LENORMAND
2b0c143808 src: Allow face names to contain an underscore
Closes #2229
2018-07-20 09:47:30 +03:00
Maxime Coste
9c82f6586c FaceRegistry: Support referencing a named face from a parent scope 2018-04-10 19:57:16 +10:00
Maxime Coste
57baad4afd Make FaceRegistry scoped
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.

colorscheme apply on global scope, which should be good enough for
now.

Fixes #1411
2018-04-07 16:27:50 +10:00
Delapouite
cb02186c77 Make error messages more consistent 2018-04-06 16:56:53 +02:00
Maxime Coste
a480e566dc ranges: Add transform overload taking directly a pointer to member
This overload will forward to the general transform implementation
using std::mem_fn to generate a callable.
2018-03-13 14:24:03 +11:00
Maxime Coste
6a6e71dc0f Highlight cursors differently when they lie on an end of line
When on an end of line, certain behaviours can be surprising, for
example delete will join the following line (which makes sense, and
is consistent, but hard to predict if we do not know the cursor is
on and end of line).

As Kakoune is moving more and more towards treating end of lines
as any other character, making it clear when the cursor lies on
them seems like a good way to reduce surprise.
2018-02-24 21:32:01 +11:00
Maxime Coste
cb16e52179 FaceRegistry: pass face names as StringViews instead of const String& 2018-02-09 22:08:29 +11:00
Maxime Coste
eeacb8b5a8 Use the _str and _sv string literals more often 2018-01-18 09:00:54 +11:00
Maxime Coste
6ada6e6d77 Move all non-core string code to string_utils.{hh,cc} 2017-10-10 10:52:32 +08:00
Maxime Coste
63b1d0c353 Rename some string conversion function to the common 'to_string' 2017-09-12 11:31:57 +08:00
Delapouite
53090c0dd3 Add debug faces 2017-09-11 15:49:33 +02:00
Maxime Coste
9baebbd186 Slight tweak of FaceRegistry::FaceOrAlias definition 2017-09-01 17:34:44 +07:00
Maxime Coste
ab6a999431 Rename containers.hh to ranges.hh (and Container to Range) 2017-08-29 15:23:03 +07:00
Delapouite
ccecc2b7cf fix: remove duplicate include to containers.hh in face_registry.cc 2017-05-30 20:01:31 +02:00
Maxime Coste
23e38a254f Introduce a LineNumberWrapped face 2017-05-07 16:26:14 +01:00
Maxime Coste
6373338c50 Replace uses of UnorderedMap with HashMap 2017-03-07 01:03:26 +00:00
Maxime Coste
025b91baca Convert some uses of lambda to more concise std::mem_fn 2016-10-10 23:44:18 +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
815924e4da Merge remote-tracking branch 'lenormf/buffer-padding' 2016-04-11 13:44:10 +01: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
e74878c299 Cleanup/fix some code 2016-02-17 16:09:34 +02:00
Frank LENORMAND
f408cf7ed3 Allow users to chose how the buffers are padded 2016-02-17 15:48:09 +02:00
Maxime Coste
6f65f4b3a5 Fix face completion, avoid a spurious temporary 2016-02-12 19:14:06 +00:00
Maxime Coste
8701a53252 Fix use of dead temporary strings in completions 2016-02-10 13:33:49 +00:00
Frank LENORMAND
bd56ed5fad Avoid instanciation of a String object everytime the parse_color
function is called.
2015-12-12 12:00:52 +03:00
Frank LENORMAND
49a5bbf3ca Ensure that at least one character follows a ',' or a '+' sign in a face
description (respectively a background color and attributes).
2015-12-11 22:58:28 +03:00
Maxime Coste
e45b0c3ffc Add StatusLine{Mode,Info,Value} built in faces
Fixes #491
2015-11-24 13:53:15 +00:00
Maxime Coste
9b8e2526f9 Merge search hihglighter and regex option highlighter in dynregex 2015-11-09 09:34:03 +00:00
Maxime Coste
e7152bad56 Add an exclusive attribute that overrides existing face 2015-10-23 13:46:41 +01:00
Maxime Coste
31cc61b6fc Allow parsing empty strings as default color in face descs 2015-10-05 20:32:51 +01:00
Maxime Coste
69b16d814b Display word insert completion buffer name in a different color 2015-10-05 01:48:00 +01:00
Maxime Coste
9fdb822c27 Add support for italic text attribute 2015-09-27 14:24:42 +01:00
Maxime Coste
7a36a4644e Detect face being aliased to itself
Fixes #374
2015-08-12 21:49:29 +01:00
Maxime Coste
9668dccea9 Add support for Default face
The Default face is used to set default color values, if set
to default (the default), refers to terminal default colors.
2015-06-04 13:49:28 +01:00
Maxime Coste
8f6fc6a0f3 Port even more code to use format function 2015-06-01 21:15:59 +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
dc46eda279 Set default MatchingChar face to bold instead of underline 2015-04-24 20:34:38 +01:00
Maxime Coste
f5da1671fd Refactor number_line higlighter, use a switch to higlhight the cursor line 2015-03-19 00:31:11 +00:00
Eike Plack
5627d33ac3 Add support for relative line numbers 2015-03-18 22:07:57 +01:00
Maxime Coste
b6ff15aa75 Unify completion from container content logic 2014-12-23 13:54:09 +00:00
Maxime Coste
064fb81b8d Move containers utils to containers.hh and add filtered/transformed utils 2014-12-23 13:40:26 +00:00
Maxime Coste
4fbaee61c5 Change default PrimarySelection face to be white on blue 2014-12-01 13:06:26 +00:00