diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-05-30 16:15:53 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-07-15 12:06:32 +0200 |
| commit | 9d0f7a0b82b1983b44636259733d6d2c39497315 (patch) | |
| tree | ae14a364d8eedb8e6405701fec156a2eaa0d3d5c /util.lua | |
| parent | fc52af4cb42485338ccc8a7968ec6289de981c2b (diff) | |
| download | vis-lspc-9d0f7a0b82b1983b44636259733d6d2c39497315.tar.gz vis-lspc-9d0f7a0b82b1983b44636259733d6d2c39497315.zip | |
implement backward compatible style handling
Remove diagnostic_style_id and use vis.ui:style_push to obtain one.
Diffstat (limited to 'util.lua')
| -rw-r--r-- | util.lua | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -409,4 +409,15 @@ function util.table.merge(weak, strong) return weak end +--- Wrapper to define a style in vis. +-- @param id The style id +-- @param style The style description +function util.style_define(id, style) + if vis.API and vis.API > 3215 then + return vis.ui:style_define(id, style) + else + return vis.win:style_define(id, style) + end +end + return util |
