feature: optional preview-buffer rendering for wrapped, navigable tables
Maintainer thường phản hồi trong vòng 6 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- lua, markdown, neovim
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Bắt đầu bằng cách đọc trình kết xuất bản xem trước hiện có và sự phân tách giữa nguồn với phần trình bày của nó, sau đó theo dõi việc kết xuất bảng và hành vi làm mới. So sánh phép chiếu, việc ngắt dòng, các ánh xạ nguồn, thay đổi kích thước và hành vi chỉnh sửa/con trỏ mà prototype yêu cầu với các interface hiện tại. Công việc được xem là hoàn tất khi có một chế độ bản xem trước tùy chọn đã được thống nhất hoặc một interface companion plugin được hỗ trợ, đồng thời vẫn giữ được việc chỉnh sửa nguồn, lưu, điều hướng và kết xuất Markdown thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Long table cells are difficult to read in narrow windows. Wrapping the underlying Markdown line does not
preserve the table's column layout, while generated virtual lines require additional handling for cursor
movement, selection, and copying.
Related requests include #536 and
#616.
Describe the solution you'd like
I have implemented a prototype that renders tables as real text rows in a separate preview buffer, while
keeping the original Markdown buffer responsible for editing, undo history, and saving.
Short columns retain their natural width where space permits. The remaining width is distributed among
longer columns. Cell contents wrap at word boundaries, with oversized words or identifiers split when
necessary. Each table row expands to accommodate its tallest cell.
Ordinary Markdown around the table continues to use render-markdown.nvim.
Demonstration:
The GIF shows long descriptions wrapping beside aligned short cells, an oversized identifier splitting
across lines, cursor movement through wrapped content, visual selection and copying, and a quick status edit
followed by undo/redo.
Benefits
-
Readable tables within the window: long cells expand vertically while preserving column alignment.
-
Native navigation and copying: continuation rows are actual buffer lines, so movement, search, selection,
and yanking work on their text. -
Source-backed editing: supported edit commands return to the corresponding source cell; preview resumes
afterward. -
Incremental updates: unchanged table layouts can be cached, with only changed preview ranges updated.
Costs and limitations
The additional preview buffer requires memory, layout work, and source-position mappings. Those mappings
must account for wrapped lines, UTF-8, links, and inline formatting.
Editing also becomes more complex: the preview remains read-only, supported quick edits run in the source
buffer, and arbitrary visual edits require switching to source mode. Saving, modified state, link
navigation, and cursor restoration must preserve the source buffer's behavior.
The prototype demonstrates feasibility; it does not establish a performance improvement over the current
renderer.
Possible upstream support
The existing preview already separates source and presentation. Supporting this approach would additionally
require:
- Table projection into real display rows, with highlights and source mappings.
- A way to exclude generated table rows from ordinary Markdown parsing.
- Refresh handling for source edits and window resizing, with source-position preservation.
This could be an optional preview mode or a supported interface for a companion plugin.
The same projection interface could later support Mermaid diagrams through an external renderer, though
precise diagram-to-source mapping would require additional metadata.
Describe alternatives you've considered
Using a separate table-viewing plugin is another option. It could open large tables in a dedicated buffer with wrapping, navigation, and copying support.
Additional information
No response
- Ngôn ngữ chính
- Lua
- Star
- 5.2k
- Fork
- 145
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MeanderingProgrammer/render-markdown.nvim
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
MeanderingProgrammer/render-markdown.nvim#706 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
MeanderingProgrammer/render-markdown.nvim#685 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
bug: Tables don't render correctly if the pipe at the end of line is missingCó thể đã có người làm @samholmes đã nhận 93 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
MeanderingProgrammer/render-markdown.nvim#673 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
MeanderingProgrammer/render-markdown.nvim#656 ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của MeanderingProgrammer/render-markdown.nvim
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mogenson/PaperWM.spoon#178 ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
ci: Verify install never runs examples_install or tests_install, so a clear they widen passesĐang mởseverity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
luainkernel/lunatik#1876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
-
bug ready ticket
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Domktorymysli/vclu#5 ·