Skip to content

set commentstring - #9

Open
ViniiR wants to merge 1 commit into
amber-lang:mainfrom
ViniiR:main
Open

ViniiR wants to merge 1 commit into
amber-lang:mainfrom
ViniiR:main

Conversation

@ViniiR

@ViniiR ViniiR commented Apr 7, 2026

Copy link
Copy Markdown

Set the commentstring so neovim(specifically) knows what to use for the gc motion
Works as intended on nvim 0.11.6 but has no effect(positive nor negative) on vim 9.1 (for unknown reasons)

Summary by CodeRabbit

  • Chores
    • Enhanced Vim editor configuration for improved Amber filetype support. Added proper comment string formatting configuration to ensure that line comments using the standard double-slash (//) syntax are correctly recognized and processed by Vim, providing a better development experience with proper syntax highlighting and comment-related operations.

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a commentstring setting to the Amber Vim filetype plugin to define how single-line comments are formatted using // syntax.

Changes

Cohort / File(s) Summary
Amber Filetype Configuration
ftplugin/amber.vim
Adds commentstring setting to define comment formatting for Amber (//\ %s).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 The Amber whispers, so sharp and bright,
Two slashes paired, a comment's light,
One tiny line, so clean, so true,
The commentstring now knows what to do!
A hop, a skip, configuration's done,
Another vim-plugin victory won!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'set commentstring' directly and clearly describes the main change: adding a commentstring setting to the Amber filetype plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
ftplugin/amber.vim (1)

17-17: LGTM! The commentstring format is correct.

The VimScript syntax and format are correct. The setting commentstring=//\ %s properly defines C-style single-line comments for Amber, where \ escapes the space and %s is the placeholder for commented text. This is consistent with the existing comments=:///,:// definition on line 16.

Optional: Consider adding an explanatory comment.

For consistency with the documentation style used elsewhere in this file (lines 5, 11, 14), consider adding a brief comment explaining the purpose of this setting:

📝 Suggested documentation improvement
+" Define comment format for comment operators (e.g., Neovim's gc motion).
 setlocal commentstring=//\ %s
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ftplugin/amber.vim` at line 17, Add a brief explanatory VimScript comment
above the setlocal commentstring=//\ %s line (similar to existing comments for
other settings) that explains this defines C-style single-line comments for
Amber; reference the related comments=:///,:// setting in the comment to show
they work together and match the file's existing documentation style.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ftplugin/amber.vim`:
- Line 17: Add a brief explanatory VimScript comment above the setlocal
commentstring=//\ %s line (similar to existing comments for other settings) that
explains this defines C-style single-line comments for Amber; reference the
related comments=:///,:// setting in the comment to show they work together and
match the file's existing documentation style.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: db76a922-f5d4-40ad-89db-fd2069a7db76

📥 Commits

Reviewing files that changed from the base of the PR and between 0cd0acd and ed76de3.

📒 Files selected for processing (1)
  • ftplugin/amber.vim

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.

1 participant