helix
helix copied to clipboard
Find out comment style from file content as a fallback
Usually we find out the language based on file extension and use the comment style used for the language. This PR lets helix figure out the correct comment style by peeking the first few lines of the file. This is a fallback, when helix is unable to figure out the language for any reason.
fixes #5380
An alternative I would propose is to guess the comment style without setting a language for the file.
An alternative I would propose is to guess the comment style without setting a language for the file.
This would be very helpful with .config files with arbitrary rules. I was going to suggest such a feature when i found this PR.
Could this please be implemented?
clsoing this one out as stale as there are still unadressed review comments. Thank you for contributing!