Skip to content
This repository was archived by the owner on May 1, 2022. It is now read-only.
This repository was archived by the owner on May 1, 2022. It is now read-only.

indentation not working if filetype=hack #51

Description

@blurrcat

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions