feature: opt-in stable wrapped tables while reading in Normal mode

未关闭
#711 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
lua, markdown, neovim
领域
frontend

调研方向

Start by reading the Updater:hide behavior described in the issue and the linked discussions in #692 and #689, then trace how wrapped table rows are rendered and revealed. The issue does not name source files or tests; first locate the table rendering and cursor handling entry points. Done means an opt-in setting preserves wrapped table alignment in Normal mode, reveals source in Insert mode, and leaves current behavior as the default, with cursor limitations documented.

由索引模型根据 Issue 内容生成。

描述

Is your feature request related to a problem? Please describe.

Related: #692 and #689. I read the explanation about virtual lines and the decision to retain the current behavior. This is a request for an opt-in reading behavior, following the suggestion in this comment.

I like the wrapped tables and want to keep them enabled. However, moving the cursor onto a wrapped row in Normal mode reveals the underlying Markdown source. That row loses its column layout and the content below it shifts, making the table difficult to read while navigating through the document.

For example, in a window narrow enough to wrap the descriptions:

| Application | Fit for your workflow | Assessment |
| --- | --- | --- |
| Session tagging | Label chats by topic and distinguish implementation work from review | Useful when retrieving previous work across many sessions |
| Skill suggestions | Suggest an appropriate review or implementation skill based on the request | Useful when several skills could apply to the same task |
| Title refresh | Decide whether the conversation has changed enough to justify a new title | Keep the existing title when the topic has not materially changed |

I tried anti_conceal.disabled_modes = { 'n' } and restarted Neovim, but the wrapped row still switches to source. My configuration also had anti_conceal.ignore.table_border = { 'n' }, which does not prevent this behavior either.

Looking at Updater:hide, replacement marks on the cursor row are hidden before the ordinary anti-conceal handling. That explains why the setting does not affect wrapped rows.

Describe the solution you'd like

Would an opt-in option to keep wrapped table rows rendered in Normal mode fit the project?

The desired behavior is:

  • Keep cell wrapping and column alignment while reading in Normal mode.
  • Reveal the underlying source for editing in Insert mode.
  • Retain the current behavior by default.
  • Keep this option scoped to wrapped tables rather than changing anti-conceal for headings, links, and other elements.

I understand virtual lines cannot provide normal buffer navigation, selection, or editing. This request does not require native interaction with every rendered continuation line or a separate preview-buffer implementation. A reading mode with documented cursor limitations, including skipping virtual content if necessary, would still be useful. Entering editing or selection modes would need a defined transition back to source.

If that trade-off cannot work reliably with Neovim's cursor behavior, documenting explicitly that wrapped cursor rows bypass anti-conceal settings would at least make the limitation easier to discover.

Describe alternatives you've considered
  • pipe_table.wrap = false: removes the wrapping I want to preserve, so it does not solve the reading problem.
  • anti_conceal.disabled_modes = { 'n' }: tried locally; it does not affect the forced source reveal for wrapped rows and applies more broadly than tables.
  • anti_conceal.ignore.table_border = { 'n' }: already configured; it does not preserve the wrapped row.
  • Disabling anti-conceal entirely: #692 reports the same limitation with that setting.
  • A separate preview buffer: discussed in #689, but I understand that introduces substantially more complexity.
Additional information

Observed with:

  • Plugin commit: 8e8795368391036643b622875a6da6a51bcd33f4
  • Neovim: v0.13.0-dev-1929+g17f43325b1
  • Arch Linux

Relevant configuration during the unsuccessful test:

require('render-markdown').setup({
    render_modes = true,
    win_options = {
        conceallevel = { rendered = 2 },
        concealcursor = { rendered = 'nc' },
    },
    anti_conceal = {
        disabled_modes = { 'n' },
        ignore = {
            table_border = { 'n' },
        },
    },
    pipe_table = {
        cell = 'padded',
        wrap = true,
    },
})
主要语言
Lua
星标
5.2k
派生
152
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MeanderingProgrammer/render-markdown.nvim 的其他 Issue

查看 MeanderingProgrammer/render-markdown.nvim 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。