Steps to reproduce:
- create new file "test.hack"
- add the following content
function test() {
$a = 1;
}
Action: gg=G to indent whole file
Expected Result: file should be indented properly
function test() {
$a = 1;
}
Actual:
function test() {
$a = 1;
}
However it works if we place the function in a php file like
<hh
function test() {
$a = 1;
}
I see that indent expression for hack is GetHackIndent, which uses GetPhpIndent under the hood. However, according to :h php-indent, php indenting only works if PHP syntax is active. Maybe it's time to create an index expression dedicated to Hack?