refactor(lsp): consolidate the different floating window methods into open_floating_preview

This commit is contained in:
Folke Lemaitre
2021-05-26 23:47:53 +02:00
parent 192f89ea1b
commit 64da499ac2
4 changed files with 137 additions and 72 deletions

View File

@@ -1151,6 +1151,7 @@ function M.show_line_diagnostics(opts, bufnr, line_nr, client_id)
end
end
opts.focus_id = "line_diagnostics"
local popup_bufnr, winnr = util.open_floating_preview(lines, 'plaintext', opts)
for i, hi in ipairs(highlights) do
local prefixlen, hiname = unpack(hi)