-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Neovim version (nvim -v)
v0.12.0-dev-1118+g6a330f893b
Neovim distribution
N/A
Operating system
macOS Tahoe Public Beta
Terminal emulator / GUI
Ghostty
Describe the bug
When completions = { blink = { enabled = true } }
is set, the completion from render-markdown
works, but it could block LSP completions from other sources! After switching to completions = { lsp = { enabled = true } }
, both render-markdown
and other LSP completion sources work.
This is a very unusual bug since most users won't care about additional LSP completions inside Markdown files. I discovered this while experimenting with Quarto .pmd
files (think of it as a plain text alternative for Jupyter Notebook).
The quarto-nvim
utilized otter.nvim
to provide language support for languages embedded inside Markdown (fenced code blocks). It provides diagnostics and completions through LSP for those code blocks. For more info, see this official tutorial of using Neovim with Quarto.
I believe this use case isn't that rare, since having auto completions for code blocks in MD is still desirable.
In addition, there is evidence that this could interfere with other completions. For example, this comment also suggested that render-markdown
blink
completion must be turned off to make another completion source work.
Expected behavior
Render markdown completion shouldn't conflict with any other sources, whether lsp
or blink
is in use.
Healthcheck output
==============================================================================
render-markdown: ✅
render-markdown.nvim [versions] ~
- ✅ OK neovim >= 0.11
- ✅ OK tree-sitter ABI: 15
- ✅ OK plugin: 8.7.15
render-markdown.nvim [configuration] ~
- ✅ OK valid
render-markdown.nvim [tree-sitter markdown] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
- ✅ OK highlights: ~/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/highlights.scm
- ✅ OK highlighter: enabled
render-markdown.nvim [tree-sitter markdown_inline] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
- ✅ OK highlights: ~/.local/share/nvim/lazy/nvim-treesitter/queries/markdown_inline/highlights.scm
render-markdown.nvim [tree-sitter html] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
render-markdown.nvim [tree-sitter latex] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
render-markdown.nvim [tree-sitter yaml] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
render-markdown.nvim [icons] ~
- ✅ OK using: nvim-web-devicons
render-markdown.nvim [executables] ~
- ✅ OK latex2text: installed
render-markdown.nvim [conflicts] ~
- ✅ OK headlines: not installed
- ✅ OK markview: not installed
- ✅ OK obsidian: installed but should not conflict
Plugin configuration
{
"MeanderingProgrammer/render-markdown.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
"nvim-treesitter/nvim-treesitter",
"jbyuki/nabla.nvim",
},
cmd = "RenderMarkdown",
keys = {
{
"<LocalLeader>r",
"<Cmd>RenderMarkdown toggle<CR>",
desc = "[r]ender Markdown",
ft = "markdown",
},
},
ft = { "markdown", "codecompanion", "quarto" },
---@module "render-markdown"
---@type render.md.Config
---@diagnostic disable: missing-fields
opts = {
file_types = { "markdown", "codecompanion", "quarto" },
-- WARN: completion via blink potentially impairs other LSP completions!
completions = { lsp = { enabled = true } },
win_options = { conceallevel = { rendered = 2 } },
-- handover math rendering to nabla
-- latex = { enabled = false },
-- TODO: nabla inline rendering doesn't look well, report
on = {
attach = function()
-- must be called after render-markdown is attached
-- require("nabla").enable_virt({ autogen = true })
end,
},
-- code border doesn't work with transparent background
code = { highlight_border = false },
inline_highlight = { highlight = "Cursor" }, -- HL Group required
},
---@diagnostic enable: missing-fields
},
Plugin error log
NA
Confirmations
- I have updated this plugin to the latest version using my plugin manager
- I have provided the text contained in all screenshots as raw text in this issue. This means if there is a screenshot below it is the copy pasted contents of the file in the screenshot. I understand that my issue will be closed if I have not.
Additional information
Some additional info, obtained with completions = { blink = { enabled = true } }
.
LspInfo
: excerpt
vim.lsp: Active Features ~
- folding_range
- Active buffers:
- inline_completion
- Active buffers:
- semantic_tokens
- Active buffers:
[3]: pyrefly (id: 1), ty (id: 3)
vim.lsp: Active Clients ~
- pyrefly (id: 1)
- Version: ? (no serverInfo.version response)
- Root directory: nil
- Command: { "pyrefly", "lsp" }
- Settings: {}
- Attached buffers: 3
- ruff (id: 2)
- Version: 0.12.10
- Root directory: nil
- Command: { "ruff", "server" }
- Settings: {}
- Attached buffers: 3
- ty (id: 3)
- Version: 0.0.1-alpha.19 (e9cb838b3 2025-08-19)
- Root directory: nil
- Command: { "ty", "server" }
- Settings: {}
- Attached buffers: 3
- otter-ls[1] (id: 4)
- Version: 2.0.0
- Root directory: ~/Library/CloudStorage/OneDrive-Personal/Projects/NLP + ML + Q-Matrix
- Command: <function @/Users/sghuang/.local/share/nvim/lazy/otter.nvim/lua/otter/lsp/init.lua:29>
- Settings: {}
- Attached buffers: 1
Blink check health:
==============================================================================
blink.cmp: 1 ⚠️
System ~
- ✅ OK curl is installed
- ✅ OK git is installed
- ✅ OK Your system is supported by pre-built binaries (aarch64-apple-darwin)
- ✅ OK blink_cmp_fuzzy lib is downloaded/built
Sources ~
- ⚠️ WARNING Some providers may show up as "disabled" but are enabled dynamically (i.e. cmdline)
Default sources ~
- lsp (blink.cmp.sources.lsp)
- path (blink.cmp.sources.path)
- snippets (blink.cmp.sources.snippets)
- buffer (blink.cmp.sources.buffer)
- omni (blink.cmp.sources.complete_func)
- obsidian (obsidian.completion.sources.blink.refs)
- copilot (blink-copilot)
- lazydev (lazydev.integrations.blink)
Cmdline sources ~
- buffer (blink.cmp.sources.buffer)
- cmdline (blink.cmp.sources.cmdline)
Disabled sources ~
- obsidian_tags (obsidian.completion.sources.blink.tags)
- obsidian_new (obsidian.completion.sources.blink.new)
- markdown (render-markdown.integ.blink)
My dot files can be found here.
Could be related: #76