aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/tohtml.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /runtime/lua/tohtml.lua
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-d5f194ce780c95821a855aca3c19426576d28ae0.tar.gz
rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.tar.bz2
rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'runtime/lua/tohtml.lua')
-rw-r--r--runtime/lua/tohtml.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/lua/tohtml.lua b/runtime/lua/tohtml.lua
index ed42b28725..4415a8cdca 100644
--- a/runtime/lua/tohtml.lua
+++ b/runtime/lua/tohtml.lua
@@ -317,7 +317,7 @@ end
--- @return nil|integer
local function register_hl(state, hl)
if type(hl) == 'table' then
- hl = hl[#hl]
+ hl = hl[#hl] --- @type string|integer
end
if type(hl) == 'nil' then
return
@@ -492,7 +492,7 @@ local function _styletable_extmarks_highlight(state, extmark, namespaces)
end
---TODO(altermo) LSP semantic tokens (and some other extmarks) are only
---generated in visible lines, and not in the whole buffer.
- if (namespaces[extmark[4].ns_id] or ''):find('vim_lsp_semantic_tokens') then
+ if (namespaces[extmark[4].ns_id] or ''):find('nvim.lsp.semantic_tokens') then
notify('lsp semantic tokens are not supported, HTML may be incorrect')
return
end
@@ -514,7 +514,7 @@ local function _styletable_extmarks_virt_text(state, extmark, namespaces)
end
---TODO(altermo) LSP semantic tokens (and some other extmarks) are only
---generated in visible lines, and not in the whole buffer.
- if (namespaces[extmark[4].ns_id] or ''):find('vim_lsp_inlayhint') then
+ if (namespaces[extmark[4].ns_id] or ''):find('nvim.lsp.inlayhint') then
notify('lsp inlay hints are not supported, HTML may be incorrect')
return
end
@@ -1162,7 +1162,9 @@ local function extend_pre(out, state)
s = s .. _pre_text_to_html(state, row)
end
local true_line_len = #line + 1
- for k in pairs(style_line) do
+ for k in
+ pairs(style_line --[[@as table<string,any>]])
+ do
if type(k) == 'number' and k > true_line_len then
true_line_len = k
end