mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 06:16:08 +00:00
feat(luahl): add priority mechanism
Base priority is 0x1000, in order to stay kinda backward compatible. Also set tree-sitter default highlight to 100 (middle-ish value)
This commit is contained in:
@@ -15,11 +15,15 @@ typedef struct {
|
||||
typedef kvec_t(VirtTextChunk) VirtText;
|
||||
#define VIRTTEXT_EMPTY ((VirtText)KV_INITIAL_VALUE)
|
||||
|
||||
typedef uint16_t DecorPriority;
|
||||
#define DECOR_PRIORITY_BASE 0x1000
|
||||
|
||||
struct Decoration
|
||||
{
|
||||
int hl_id; // highlight group
|
||||
VirtText virt_text;
|
||||
// TODO(bfredl): style, signs, etc
|
||||
DecorPriority priority;
|
||||
bool shared; // shared decoration, don't free
|
||||
};
|
||||
|
||||
@@ -29,6 +33,7 @@ typedef struct {
|
||||
int end_row;
|
||||
int end_col;
|
||||
int attr_id;
|
||||
DecorPriority priority;
|
||||
VirtText *virt_text;
|
||||
bool virt_text_owned;
|
||||
} HlRange;
|
||||
|
Reference in New Issue
Block a user