helix icon indicating copy to clipboard operation
helix copied to clipboard

Find out comment style from file content as a fallback

Open semin-park opened this issue 2 years ago • 2 comments

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

semin-park avatar Jan 03 '23 16:01 semin-park

An alternative I would propose is to guess the comment style without setting a language for the file.

kirawi avatar Jan 04 '23 15:01 kirawi

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?

Schweber avatar Mar 26 '23 07:03 Schweber

clsoing this one out as stale as there are still unadressed review comments. Thank you for contributing!

pascalkuthe avatar Apr 13 '24 23:04 pascalkuthe