mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
Problem: layout i.e. whitespace that is part of codelenses is currently displayed as weird symbols and large amounts of spaces Solution: replace all consecutive whitespace symbols with a single space character when trying to display codelenses as virtual text
This commit is contained in:
@@ -164,7 +164,7 @@ function M.display(lenses, bufnr, client_id)
|
|||||||
return a.range.start.character < b.range.start.character
|
return a.range.start.character < b.range.start.character
|
||||||
end)
|
end)
|
||||||
for j, lens in ipairs(line_lenses) do
|
for j, lens in ipairs(line_lenses) do
|
||||||
local text = lens.command and lens.command.title or 'Unresolved lens ...'
|
local text = (lens.command and lens.command.title or 'Unresolved lens ...'):gsub('%s+', ' ')
|
||||||
table.insert(chunks, { text, 'LspCodeLens' })
|
table.insert(chunks, { text, 'LspCodeLens' })
|
||||||
if j < num_line_lenses then
|
if j < num_line_lenses then
|
||||||
table.insert(chunks, { ' | ', 'LspCodeLensSeparator' })
|
table.insert(chunks, { ' | ', 'LspCodeLensSeparator' })
|
||||||
|
Reference in New Issue
Block a user