Code fence lines are fully hidden in .qmd buffers unless a .md file was opened first
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- lua, neovim
調査の方向性
Start by reproducing the issue in Neovim with a .qmd file opened before any .md file, then compare the behavior after opening Markdown. The report points to nvim-treesitter’s Markdown highlights.scm conceal rules and notes that setting conceallevel=0 restores the fences. Find the initialization path that differs between those cases; done when fence lines remain visible in the reported .qmd startup sequence without requiring the workaround.
索引モデルが issue の本文から書いたものです。
説明
In a .qmd buffer, the opening and closing lines of a fenced code block (```python / ```) are completely hidden unless the cursor is on them. If I first open any .md file in the same session and then open the .qmd, the fence lines are shown normally (screenshots below).
Findings
- The hiding seems to come from nvim-treesitter's markdown
highlights.scm, which setsconcealandconceal_linesonfenced_code_block_delimiterand theinfo_stringlanguage. - With
set conceallevel=0the fences reappear, so it's treesitter conceal, not syntax conceal (syntaxis empty,synconcealed()returns0). - The query file used is the same in both states.
- Manually loading render-markdown.nvim in the broken state (
:Lazy load render-markdown.nvim) changes nothing, and itsfile_typesdoesn't includequarto. So opening a markdown file triggers something else that affects.qmdbuffers.
Workaround
Creating a scratch buffer with filetype=markdown once, on the first quarto FileType event, fixes it:
vim.api.nvim_create_autocmd("FileType", {
-- When opening a quarto file with quarto-nvim, first trigger a load with render-markdown to ensure its proper initialization.
-- This works around an issue where loading a quarto file before markdown results in concealed code block fences.
pattern = "quarto",
once = true,
callback = function()
local scratch = vim.api.nvim_create_buf(false, true)
vim.bo[scratch].filetype = "markdown"
vim.schedule(function()
vim.api.nvim_buf_delete(scratch, { force = true })
end)
end,
})
Steps to reproduce
- Start Neovim and open a
.qmdfile containing a Python code block. - Move the cursor off the fence lines: they disappear.
- Open any
.mdfile, then delete the.qmdbuffer and reopen it: the fences are visible.
Environment
- Neovim: 0.12.4
- OS: macOS
- Distribution: LazyVim
- quarto-nvim / nvim-treesitter / render-markdown.nvim: v2.1.0 / e289100 / 245956d
- Config:
ft = "quarto", opts = { codeRunner = { enabled = true, default_method = "molten", }, }
Screenshots
.qmd opened first
.qmd opened after .md
- 主要言語
- Lua
- スター
- 533
- フォーク
- 21
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto-nvim のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
quarto-dev/quarto-nvim#127 · リアクション 4 件 ·
-
waiting
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
quarto-dev/quarto-nvim#122 · コメント 3 件 ·
-
enhancement waiting
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
quarto-dev/quarto-nvim#31 · コメント 1 件 ·
-
add quarto-lspオープンenhancement waiting
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
quarto-dev/quarto-nvim#13 · コメント 3 件 · リアクション 1 件 ·
quarto-dev/quarto-nvim の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
petertriho/nvim-scrollbar#120 ·
-
Addon Conflict Bug Forever Module - Tracker
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 5 日以内に返信
-
docs(plugin): complete terminal API and permission scope documentation対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdocumentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
eugenioenko/ttt#1000 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信