From 53c6d728d0f39e361a1922f77f45786616f69f1c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 25 Apr 2024 17:51:02 +0200 Subject: support highlighting line numbers using vis:style_pos Replace the hacky style_lineno code with the new vis:style_pos API probably included in upcoming vis v0.9. --- lspc.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lspc.lua') diff --git a/lspc.lua b/lspc.lua index d45811b..aa771ed 100644 --- a/lspc.lua +++ b/lspc.lua @@ -34,14 +34,15 @@ local lspc = { -- should diagnostics be highlighted if available highlight_diagnostics = 'line', -- style id used by lspc to register the style used to highlight diagnostics - diagnostic_style_id = 64, -- 64 is the last style id available for the lexer styles. See vis/ui.h. + -- by default win.STYLE_LEXER_MAX is used (the last style id available for the lexer styles). See vis/ui.h. + diagnostic_style_id = nil, -- styles used by lspc to highlight the diagnostic range -- must be set by the user diagnostic_styles = { - error = 'fore:red,italics', - warning = 'fore:yellow,italics', - information = 'fore:yellow,italics', - hint = 'fore:yellow,italics', + error = 'fore:red,italics,reverse', + warning = 'fore:yellow,italics,reverse', + information = 'fore:yellow,italics,reverse', + hint = 'fore:yellow,italics,reverse', }, -- restore the position of the primary curser after applying a workspace edit -- cgit v1.2.3