Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perl support #978

Merged
merged 2 commits into from Nov 8, 2021
Merged

Perl support #978

merged 2 commits into from Nov 8, 2021

Conversation

ath3
Copy link
Contributor

@ath3 ath3 commented Nov 4, 2021

perlsyntax

@ath3
Copy link
Contributor Author

ath3 commented Nov 4, 2021

The tree-sitter grammar has still some issues, so expect it to behave incorrectly sometimes.

@ath3 ath3 marked this pull request as draft November 5, 2021 18:45
@ath3 ath3 marked this pull request as ready for review November 5, 2021 19:58
@ath3
Copy link
Contributor Author

ath3 commented Nov 5, 2021

I have problems defining indents.
What i tried is producing this:

sub test {
bla
  bla
  bla
  }

interestingly, if i put {} first, then push enter between them, it aligns correctly:

sub test {
  bla
  bla
  bla
}

Probably related: i had to disable highlighting "if_statement", because then everything until last elsif/else branch closing was highlighted as "if_statement". I think "blocks" only become "blocks" once they get get their closing parenthesis.

@archseer
Copy link
Member

archseer commented Nov 7, 2021

Yeah you're hitting #763 (comment), we can't guess what the incomplete document state is supposed to parse like.

If you have auto-pairs on then the block would automatically be closed before you press enter:

sub test {|}

so it would then work:

sub test {
  |
}

@archseer archseer merged commit 3074464 into helix-editor:master Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants