@@ -104,6 +104,9 @@ type HLAttrs struct {
104
104
// Bold is the bold font style.
105
105
Bold bool `msgpack:"bold,omitempty"`
106
106
107
+ // Standout is the standout font style.
108
+ Standout int `msgpack:"standout,omitempty"`
109
+
107
110
// Underline is the underline font style.
108
111
Underline bool `msgpack:"underline,omitempty"`
109
112
@@ -116,19 +119,17 @@ type HLAttrs struct {
116
119
// Reverse is the reverse to foreground and background.
117
120
Reverse bool `msgpack:"reverse,omitempty"`
118
121
119
- // Inverse same as Reverse .
120
- Inverse bool `msgpack:"inverse ,omitempty"`
122
+ // Strikethrough is the strikethrough font style .
123
+ Strikethrough bool `msgpack:"strikethrough ,omitempty"`
121
124
122
- // Standout is the standout font style.
123
- Standout int `msgpack:"standout,omitempty"`
125
+ ForegroundIndexed bool `msgpack:"fg_indexed,omitempty"`
124
126
125
- // Nocombine override attributes instead of combining them.
126
- Nocombine int `msgpack:"nocombine,omitempty"`
127
+ BackgroundIndexed bool `msgpack:"bg_indexed,omitempty"`
127
128
128
- // Foreground use normal foreground color.
129
+ // Foreground is foreground color of RGB color.
129
130
Foreground int `msgpack:"foreground,omitempty" empty:"-1"`
130
131
131
- // Background use normal background color.
132
+ // Background is background color of RGB color.
132
133
Background int `msgpack:"background,omitempty" empty:"-1"`
133
134
134
135
// Special is used for undercurl and underline.
@@ -140,6 +141,31 @@ type HLAttrs struct {
140
141
// Only takes effect if 'pumblend' or 'winblend' is set for the menu or window.
141
142
// See the help at the respective option.
142
143
Blend int `msgpack:"blend,omitempty"`
144
+
145
+ // Nocombine override attributes instead of combining them.
146
+ Nocombine bool `msgpack:"nocombine,omitempty"`
147
+
148
+ // Default don't override existing definition, like "hi default".
149
+ //
150
+ // This value is used only SetHighlight.
151
+ Default bool `msgpack:"default,omitempty"`
152
+
153
+ // Cterm is cterm attribute map. Sets attributed for cterm colors.
154
+ //
155
+ // Note thet by default cterm attributes are same as attributes of gui color.
156
+ //
157
+ // This value is used only SetHighlight.
158
+ Cterm * HLAttrs `msgpack:"cterm,omitempty"`
159
+
160
+ // CtermForeground is the foreground of cterm color.
161
+ //
162
+ // This value is used only SetHighlight.
163
+ CtermForeground int `msgpack:"ctermfg,omitempty" empty:"-1"`
164
+
165
+ // CtermBackground is the background of cterm color.
166
+ //
167
+ // This value is used only SetHighlight.
168
+ CtermBackground int `msgpack:"ctermbg,omitempty" empty:"-1"`
143
169
}
144
170
145
171
// Mapping represents a nvim mapping options.
@@ -400,6 +426,8 @@ type TextChunk struct {
400
426
// cursor
401
427
// Cursor position in current window.
402
428
//
429
+ // Win is window ID for Relative="win".
430
+ //
403
431
// Anchor is the decides which corner of the float to place at row and col.
404
432
//
405
433
// NW
@@ -413,7 +441,6 @@ type TextChunk struct {
413
441
//
414
442
// BufPos places float relative to buffer text only when Relative == "win".
415
443
// Takes a tuple of zero-indexed [line, column].
416
- //
417
444
// Row and Col if given are applied relative to this position, else they default to Row=1 and Col=0 (thus like a tooltip near the buffer text).
418
445
//
419
446
// Row is the row position in units of "screen cell height", may be fractional.
@@ -426,6 +453,9 @@ type TextChunk struct {
426
453
// External is the GUI should display the window as an external top-level window.
427
454
// Currently accepts no other positioning configuration together with this.
428
455
//
456
+ // ZIndex is stacking order. floats with higher "zindex" go on top on floats with lower indices. Must be larger than zero.
457
+ // The default value for floats are 50. In general, values below 100 are recommended, unless there is a good reason to overshadow builtin elements.
458
+ //
429
459
// Style is the Configure the appearance of the window.
430
460
// Currently only takes one non-empty value:
431
461
//
@@ -435,18 +465,24 @@ type TextChunk struct {
435
465
//
436
466
// Disables "number", "relativenumber", "cursorline", "cursorcolumn", "foldcolumn", "spell" and "list" options.
437
467
// And, "signcolumn" is changed to "auto" and "colorcolumn" is cleared.
438
- //
439
468
// The end-of-buffer region is hidden by setting "eob" flag of "fillchars" to a space char, and clearing the EndOfBuffer region in "winhighlight".
440
469
//
441
470
// border
442
471
// Style of (optional) window border. This can either be a string or an array.
443
472
// The string values are:
444
- // "none"
473
+ //
474
+ // none
445
475
// No border. This is the default.
446
- // " single"
476
+ // single
447
477
// A single line box.
448
- // " double"
478
+ // double
449
479
// A double line box.
480
+ // rounded
481
+ // Like "single", but with rounded corners ("╭" etc.).
482
+ // solid
483
+ // Adds padding by a single whitespace cell.
484
+ // shadow
485
+ // A drop shadow effect by blending with the background.
450
486
//
451
487
// If it is an array it should be an array of eight items or any divisor of
452
488
// eight. The array will specifify the eight chars building up the border
@@ -461,10 +497,15 @@ type TextChunk struct {
461
497
// Or all chars the same as:
462
498
// [ "x" ]
463
499
//
500
+ // An empty string can be used to turn off a specific border, for instance,
501
+ // [ "", "", "", ">", "", "", "", "<" ]
502
+ //
464
503
// By default "FloatBorder" highlight is used which links to "VertSplit"
465
504
// when not defined.
466
505
// It could also be specified by character:
467
506
// [ {"+", "MyCorner"}, {"x", "MyBorder"} ]
507
+ //
508
+ // NoAutocmd is if true then no buffer-related autocommand events such as BufEnter, BufLeave or BufWinEnter may fire from calling this function.
468
509
type WindowConfig struct {
469
510
// Relative is the specifies the type of positioning method used for the floating window.
470
511
Relative string `msgpack:"relative,omitempty"`
@@ -496,13 +537,38 @@ type WindowConfig struct {
496
537
// External is the GUI should display the window as an external top-level window.
497
538
External bool `msgpack:"external,omitempty"`
498
539
540
+ // ZIndex stacking order. floats with higher `zindex` go on top on floats with lower indices. Must be larger than zero.
541
+ ZIndex int `msgpack:"zindex,omitempty" empty:"50"`
542
+
499
543
// Style is the Configure the appearance of the window.
500
544
Style string `msgpack:"style,omitempty"`
501
545
502
546
// Border is the style of window border.
503
- Border []string `msgpack:"border,omitempty"`
547
+ Border interface {} `msgpack:"border,omitempty"`
548
+
549
+ // NoAutocmd whether the fire buffer-related autocommand events
550
+ NoAutocmd bool `msgpack:"noautocmd,omitempty"`
504
551
}
505
552
553
+ // BorderStyle represents a WindowConfig.Border style.
554
+ type BorderStyle string
555
+
556
+ // list of BorderStyle.
557
+ const (
558
+ // BorderStyleNone is the no border. This is the default.
559
+ BorderStyleNone = BorderStyle ("none" )
560
+ // BorderStyleSingle is a single line box.
561
+ BorderStyleSingle = BorderStyle ("single" )
562
+ // BorderStyleDouble a double line box.
563
+ BorderStyleDouble = BorderStyle ("double" )
564
+ // BorderStyleRounded like "single", but with rounded corners ("╭" etc.).
565
+ BorderStyleRounded = BorderStyle ("rounded" )
566
+ // BorderStyleSolid adds padding by a single whitespace cell.
567
+ BorderStyleSolid = BorderStyle ("solid" )
568
+ // BorderStyleShadow a drop shadow effect by blending with the background.
569
+ BorderStyleShadow = BorderStyle ("shadow" )
570
+ )
571
+
506
572
// ExtMark represents a extmarks type.
507
573
type ExtMark struct {
508
574
// ID is the extmarks ID.
@@ -582,6 +648,6 @@ func (level LogLevel) String() string {
582
648
case LogErrorLevel :
583
649
return "ErrorLevel"
584
650
default :
585
- return "unkonwn Level"
651
+ return "unknown Level"
586
652
}
587
653
}
0 commit comments