-
Notifications
You must be signed in to change notification settings - Fork 49
bug: Plugin stopped rendering markdown in floating windows (Hover doc) after specific commit #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Update: exclude = {
-- Buftypes ignored by this plugin, see :h 'buftype'
buftypes = {"nofile},
},
Thank you once again for your amazing plugin and your support! |
Thank you for the kind words :) I added the option because I did not like the sign column in LSP docs, but disabling the signcolumn there is a good idea. I should have made it opt in in either case, have changed the default to be the empty list rather than defaulting to |
Thank you for the prompt response and the update! I can confirm that removing the sign column has made the experience a whole lot better. Rendering the docs and diagnostics using the plugin has significantly improved the readability and usability of the content. Specifically, the ability to conceal URLs in diagnostics is a great feature. It makes the diagnostic messages shorter and more concise, while still allowing the user to open the URLs in a browser when needed. Once again, thank you for your amazing work |
Hi, I just found this issue. I'm currently banging my head against the wall, trying to find a way to disable the signcolumn only for hover windows, because I still want to use this plugin in hover windows. @abulwafa have you found a way to do that? |
@kmoschcau Here it is This line : local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
local bufnr, winnr =
orig_util_open_floating_preview(contents, syntax, opts, ...)
vim.api.nvim_set_option_value("signcolumn", "no", { win = winnr })
vim.api.nvim_set_option_value("filetype", "markdown", { buf = bufnr })
return bufnr, winnr
end |
Ah a bit of monkey patching. :D |
Hi @kmoschcau, I haven't found a way to override window/buffer options through the • {opts} (`table?`) with optional fields (additional keys are
filtered with |vim.lsp.util.make_floating_popup_options()|
before they are passed on to |nvim_open_win()|)
• {height}? (`integer`) Height of floating window
• {width}? (`integer`) Width of floating window
• {wrap}? (`boolean`, default: `true`) Wrap long lines
• {wrap_at}? (`integer`) Character to wrap at for
computing height when wrap is enabled
• {max_width}? (`integer`) Maximal width of floating
window
• {max_height}? (`integer`) Maximal height of floating
window
• {focus_id}? (`string`) If a popup with this id is
opened, then focus it
• {close_events}? (`table`) List of events that closes the
floating window
• {focusable}? (`boolean`, default: `true`) Make float
focusable.
• {focus}? (`boolean`, default: `true`) If `true`, and if
{focusable} is also `true`, focus an existing floating
window with the same {focus_id} You can check for the ex. check if or check for |
I've made this part of the plugin itself as part of this change: d398f3e Since I needed to globally change the signs the plugin creates anyway |
@abulwafa the new fix now addresses this without any hacks. |
@MeanderingProgrammer confirmed working as expected |
Neovim version (nvim -v)
0.11.0
Operating system
Linux
Terminal emulator / GUI
Kitty
Describe the bug
First of all, I want to extend my gratitude for creating such an amazing plugin!
I've encountered an issue where the plugin stopped rendering markdown correctly in floating windows, such as Hover doc, after a specific commit. The plugin continues to work perfectly in markdown files themselves.
Steps to Reproduce:
Open a markdown file to confirm the plugin is working.
Use a feature that triggers a floating window (e.g., Hover doc).
Observe that the markdown rendering is not applied in the floating window.
The commit fb7f81e
Expected behavior
The plugin should render markdown with the same quality and visual enhancements in floating windows as it does in markdown files.
Healthcheck output (:checkhealth render-markdown)
markdown.nvim [configuration] ~
markdown.nvim [nvim-treesitter] ~
markdown.nvim [executables] ~
Additional information
I override the default open float handler, by setting a filetype
Before
After
The text was updated successfully, but these errors were encountered: