mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +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
(cherry picked from commit d9a2acdab3
)
Co-authored-by: Mango The Fourth <40720523+MangoIV@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4f0c4c3921
commit
efe8a0a520
@ -164,7 +164,7 @@ function M.display(lenses, bufnr, client_id)
|
||||
return a.range.start.character < b.range.start.character
|
||||
end)
|
||||
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' })
|
||||
if j < num_line_lenses then
|
||||
table.insert(chunks, { ' | ', 'LspCodeLensSeparator' })
|
||||
|
Reference in New Issue
Block a user