Skip to content

Commit

Permalink
add option to allow user to configure floating window
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewsia98 committed Mar 23, 2023
1 parent b19ba6c commit af436ca
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/jupynium/lua/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,14 @@ function Jupynium_kernel_hover(bufnr)

local markdown_lines = vim.lsp.util.convert_input_to_markdown_lines(out)
markdown_lines = vim.lsp.util.trim_empty_lines(markdown_lines)
vim.lsp.util.open_floating_preview(markdown_lines, "markdown", {
max_width = 84,
})

local opts = { max_width = 84 }
local ok, options = pcall(require, "jupynium.options")
if ok then
opts = vim.tbl_extend("force", opts, options.opts.floating_win_opts.hover)
end

vim.lsp.util.open_floating_preview(markdown_lines, "markdown", opts)
end

local function get_memory_addr(t)
Expand Down

0 comments on commit af436ca

Please sign in to comment.