-
Notifications
You must be signed in to change notification settings - Fork 61
bug: CodeBlock not works #351
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
This should only impact I think I'll create an overall issue to get ahead of these. |
Will keep track here: #352 |
@maxrzaw yeah i am also facing some weird visual issues with lsp hover ![]() can we disable render-markdown for lsp and only have it enables on .md files?? |
The @maxrzaw I'm actually not sure why you're seeing the raw fenced code block, can you try updating the plugin and see if it still looks like that? @lmnzx I've got no idea what's going on there, seems like one decoration is being shifted into the incorrect position, potentially related to this: neovim/neovim#33033, but honestly not sure. Yeah, you can disable this plugin for LSP hover docs with: require('render-markdown').setup({
overrides = {
buftype = {
nofile = { enabled = false },
},
},
}) |
## Details Related issues: - #351 - #352 This change adds back the code border that currently gets removed by the default `conceal_lines` highlight that ships with `nvim-treesitter`. I tried to make this work using virtual lines at first but ran into quite a few issues with screen offset behavior and was unable to fix the fact that LSP hover docs are now truncated based on concealed lines leading to windows that did not take our virtual lines into account. Ultimately to get around this I've added a new option called `patterns` which takes a list of directive names & ids and runs the `disable_pattern` API to turn these off. The default value: ```lua { patterns = { markdown = { disable = true, directives = { { id = 17, name = 'conceal_lines' }, { id = 18, name = 'conceal_lines' }, }, }, }, } ``` Will disable markdown highlight patterns 17 & 18 if they correspond to a `conceal_lines` directive. There is not any guarantee that the ids will remain constant and users can override the highlights with their own which we do not want to break. Hopefully ensuring the ids & names match will work for most people and I can keep the default value working with the most common case going forward. This behavior can be disabled by users by setting `disable = false`. Since removing these highlight patterns also removes the regular character level concealing this plugin has been updated to add these for the delimiter and language nodes itself, rather than relying on the `nvim-treesitter` behavior. Disabling patterns can take a while at startup so this instead runs on just before this plugin actually attaches to a buffer rather than as part of the startup sequence. This behavior is specific to `0.11.0` so the logic is appropriately gated to prevent any older versions from running into errors, we should still be compatible down to `0.9.0`. There's also a new `code.border` value called `hide` which is the new default and applies the `conceal_lines` value to empty fenced code delimiters. Older versions of neovim will continue to use the `thin` border style as a fallback. This largely hides the bottom border, but will also hide the top one if no language icon / name is added or available.
Should work after: e6c8081 |
Neovim version (nvim -v)
v0.11.0-dev-1844+gc3337e357a
Neovim distribution
N/A
Operating system
macos
Terminal emulator / GUI
kitty
Describe the bug
It seems I updated to the latest version of neovim and update the new version nvim-treesitter, it not works as expected.
When I revert this change
nvim-treesitter/nvim-treesitter#7685
It works as expected.
Expected behavior
I hope it works with the latest nvim-treesitter.
Healthcheck output
Plugin configuration
Plugin error log
Confirmations
Additional information
No response
The text was updated successfully, but these errors were encountered: