vim.lsp.handlers['textDocument/hover'] = (function(_, result)
local handler = function(_, result)
if result then
local lines = vim.split(result.contents.value, '\n')
local bufnr = vim.lsp.util.open_floating_preview(lines, 'markdown', { border = 'rounded' })
require('colorizer').highlight_buffer(bufnr, nil, vim.list_slice(lines, 2, #lines), 0, require('colorizer').get_buffer_options(0))
end
end
return handler
end)()
Note: Passing a table with all the rows, colorizer doesn't work
Great plugin @norcalli
Using
vim.lsp.buf.hover()
to colorizer menu.Tested in Neovim 0.5.1
Note: Passing a table with all the rows, colorizer doesn't work