-
Notifications
You must be signed in to change notification settings - Fork 19
📝 Synchronize comments with implementation #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📝 Synchronize comments with implementation #292
Conversation
WalkthroughUpdated documentation comments in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buffer/decoration.ts
Outdated
* It uses `prop_add` in Vim and `nvim_buf_set_extmark` in Neovim to decorate the | ||
* buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the undecorate comment to match the implementation.
undecorate
calls vimFn.prop_remove
and nvimFn.nvim_buf_clear_namespace
, not prop_add
/nvim_buf_set_extmark
, so the updated comment is still inaccurate. Please align it with the actual APIs being used.
- * It uses `prop_add` in Vim and `nvim_buf_set_extmark` in Neovim to decorate the
- * buffer.
+ * It uses `prop_remove` in Vim and `nvim_buf_clear_namespace` in Neovim to
+ * remove decorations.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
* It uses `prop_add` in Vim and `nvim_buf_set_extmark` in Neovim to decorate the | |
* buffer. | |
* It uses `prop_remove` in Vim and `nvim_buf_clear_namespace` in Neovim to | |
* remove decorations. |
🤖 Prompt for AI Agents
In buffer/decoration.ts around lines 125 to 126, the comment for `undecorate` is
incorrect: it references `prop_add` and `nvim_buf_set_extmark` but the
implementation calls `vimFn.prop_remove` and `nvimFn.nvim_buf_clear_namespace`.
Update the comment to accurately describe that `undecorate` removes properties
via `prop_remove` in Vim and clears decorations by calling
`nvim_buf_clear_namespace` in Neovim (mentioning namespace/ids as appropriate),
so the comment matches the actual APIs used.
2328ee8
to
e9ff669
Compare
Thanks. I'll fix CI failure later so merge. |
After commit 504bc8e,
nvim_buf_set_extmark
has been used for decoration as the successor tonvim_buf_add_highlight
, but some comments were not updated accordingly.This Pull Request synchronizes the comments with the implementation.
Summary by CodeRabbit