aboutsummaryrefslogtreecommitdiff
path: root/lspc.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-04-25 17:51:02 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-04-25 20:26:05 +0200
commit53c6d728d0f39e361a1922f77f45786616f69f1c (patch)
tree6310ca3db14a44d2e3b0b4bfc740a7e2c6c4c8a1 /lspc.lua
parent036a656fbdd2a21d09746a8dcfb7a71abab47b62 (diff)
downloadvis-lspc-53c6d728d0f39e361a1922f77f45786616f69f1c.tar.gz
vis-lspc-53c6d728d0f39e361a1922f77f45786616f69f1c.zip
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.
Diffstat (limited to 'lspc.lua')
-rw-r--r--lspc.lua11
1 files changed, 6 insertions, 5 deletions
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