How do you insert static strings into powerline segments?
dcorbe opened this issue · comments
I have no idea why this isn't working:
{
"segment_data": {
"string": {
"name": "foo",
"contents": "bar"
}
},
"segments": {
"left": [
{
"string": "foo"
}
]
}
}
{
"type": "string",
"name": "foo",
"contents": "bar",
"highlight_groups": [ "group1", "group2" ]
},
Such a segment should then be placed in the "left"
or "right"
arrays in your config:
{
"segments": {
"left": [
{
"type": "string",
"name": "foo",
"contents": "bar",
"highlight_groups": [ "group1", "group2" ]
}
]
}
}
If the string is part of a highlight group, I end up with powerline's styling, including unwanted extra spacing. All I want is plain text. Is there a way to achieve that?
Sorry for the late response, I'm not sure if I understand your question correctly. Do you want a segment with a string as content that additionally has no space around the string? Take a look at the segment options draw_inner_divider
and draw_soft_divider
. These are general options for segments—In any case you have to specify highlight groups for a segment.
^ typo'd issue number; ignore this