nixfmt
nixfmt copied to clipboard
/* comments */ should not be reformatted
Description
/* */
style comments should not be reformatted. They have additional use cases such as tree-sitter picking up the the syntax to highlight before scripts inside multiline strings.
Small example input
/* lua */ ''
print("Hello, world!")
''
Expected output
/* lua */ ''
print("Hello, world!")
''
(now tree-sitter in my editor highlights this string to Lua which really helps me read/write code in this block now that it’s not just syntax highlighted as a string)
Actual output
# lua
''
print("Hello, world!")
''