Skip to content
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

Change default comment token to # for unrecognized files #12080

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kfatyuip
Copy link
Contributor

Helix currently uses // as the default comment token for unrecognized file types, but this doesn’t align well with Linux conventions. Since Linux configuration files—such as locale.conf, pacman.conf, and /etc/sudoers—almost always use # for comments, defaulting to // feels out of place.

Files like locale.conf and pacman.conf are sometimes misclassified as HOCON simply because they have a .conf extension, and files without extensions (e.g., sudoers) end up with // as their comment token, which doesn’t match their typical usage.

Most programming languages that use // (e.g., Rust, JavaScript) are easily recognized by their file extensions, whereas files without extensions are more likely to follow Linux conventions and use #. Switching the default to # makes Helix more predictable and practical for Linux users.

helix-core/src/comment.rs Outdated Show resolved Hide resolved
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants