aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/tohtml.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/tohtml.lua')
-rw-r--r--runtime/lua/tohtml.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/tohtml.lua b/runtime/lua/tohtml.lua
index a4b5a741bc..6a5bd6de9d 100644
--- a/runtime/lua/tohtml.lua
+++ b/runtime/lua/tohtml.lua
@@ -1003,6 +1003,7 @@ local function extend_style(out, state)
--TODO(altermo) use local namespace (instead of global 0)
local fg = vim.fn.synIDattr(hlid, 'fg#')
local bg = vim.fn.synIDattr(hlid, 'bg#')
+ local sp = vim.fn.synIDattr(hlid, 'sp#')
local decor_line = {}
if vim.fn.synIDattr(hlid, 'underline') ~= '' then
table.insert(decor_line, 'underline')
@@ -1020,6 +1021,8 @@ local function extend_style(out, state)
['font-weight'] = vim.fn.synIDattr(hlid, 'bold') ~= '' and 'bold' or nil,
['text-decoration-line'] = not vim.tbl_isempty(decor_line) and table.concat(decor_line, ' ')
or nil,
+ -- TODO(ribru17): fallback to displayed text color if sp not set
+ ['text-decoration-color'] = sp ~= '' and cterm_to_hex(sp) or nil,
--TODO(altermo) if strikethrough and undercurl then the strikethrough becomes wavy
['text-decoration-style'] = vim.fn.synIDattr(hlid, 'undercurl') ~= '' and 'wavy' or nil,
}