Skip to content

Conversation

@qvalentin
Copy link
Owner

@qvalentin qvalentin commented Jan 16, 2026

Fixes #20

Summary by CodeRabbit

  • Bug Fixes

    • Improved concealment display to prevent duplicates across different concealment level settings
    • Added buffer validation to ensure stable performance when processing concealment updates
  • Documentation

    • Updated configuration recommendations for optimal handling of wrapped lines

✏️ Tip: You can customize this high-level summary in your review settings.

- Use 'inline' virtual text with 'conceal' when 'conceallevel > 0'
- Fallback to 'overlay' with padding when 'conceallevel == 0'
- Add note to README regarding 'conceallevel' recommendation
- Clear namespace for visible range before applying concealment
- Use stable IDs for extmarks based on position
- Ensure full range concealment when using inline virtual text
@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

The PR updates documentation to recommend a vim configuration setting and refactors the concealment system to handle different concealment levels with conditional strategies: inline virtual text when conceallevel > 0, overlay-based when conceallevel == 0, plus stability improvements via positional-based extmark IDs and buffer validity checks.

Changes

Cohort / File(s) Summary
Documentation
README.md
Adds note recommending vim.opt.conceallevel = 2 setting in two locations for correct wrapped line handling.
Concealment System Refactor
lua/helm-ls/conceal.lua
Reworks set_extmark with conditional logic based on conceallevel; introduces stable positional-based IDs for extmarks to reduce duplicates; adds buffer validity check before applying extmarks; modifies cursor-on-line flow from early return to goto-continue pattern; clears visible-range extmarks prior to reprocessing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit hops through conceal and light,
Where levels dance in clever sight,
Positions marked with stable grace,
And buffers checked in time and space—
No phantom marks shall plague the view,
The wrapped lines shine, both bold and true! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'fix(conceal): fix for wrapped lines' is directly related to the main change, which improves concealment handling for wrapped lines by adjusting conceallevel behavior.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6f3a8d and 1de7210.

📒 Files selected for processing (2)
  • README.md
  • lua/helm-ls/conceal.lua
🔇 Additional comments (7)
README.md (2)

13-15: Clear documentation note for wrapped-line behavior.

Nice, succinct guidance that should reduce user confusion.


55-57: Good to mirror the recommendation in the default config.

Keeps guidance discoverable where users configure the plugin.

lua/helm-ls/conceal.lua (5)

45-72: Conceal-level branching and positional IDs look solid.

Should improve wrapping while reducing duplicate extmarks. Please verify behavior with both conceallevel 0 and >0 on supported Neovim versions.


96-100: Good guard against stale async callbacks.

This should prevent applying extmarks after buffer switches. Please sanity-check with rapid buffer changes while hover results are in-flight.


125-127: Visible-range clear is a sensible de-dup step.

Please verify no noticeable flicker or perf regression when scrolling large files.


134-139: Skipping only the cursor line keeps the pass complete.

No issues here.


156-156: Spacing-only change.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qvalentin qvalentin merged commit 3119a11 into main Jan 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: template value replacement doesn't fully apply to wrapped line

2 participants