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

fix: js inner without curly braces #511

Merged

Conversation

ValJed
Copy link
Contributor

@ValJed ValJed commented Oct 24, 2023

Following some posts I found about removing the curly braces of inner selections.
Like for functions and methods it feels logical to me that it would behave the same for other blocks.

I updated the ecma text objects to select only the inner part for loops and if statements.
I tested locally it seems working nicely, let me know if I made some mistakes, I basically reused code I found. (not familiar with the syntax).

@ValJed ValJed changed the title Fix/ js inner without curly braces Fix: js inner without curly braces Oct 24, 2023
@ValJed ValJed changed the title Fix: js inner without curly braces fix: js inner without curly braces Oct 24, 2023
Copy link
Member

@theHamsta theHamsta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me! Some of the other maintainers want to have a look @kiyoon @amaanq ?

@kiyoon
Copy link
Collaborator

kiyoon commented Oct 26, 2023

It looks very good!

By the way, did the behaviour in Python change? Maybe the python parser has some updates? The python test is failing maybe because of that

@theHamsta
Copy link
Member

The Python tests are failing already since a long time. I did not investigate the reasons for that.

@theHamsta theHamsta enabled auto-merge (rebase) October 26, 2023 11:26
@theHamsta theHamsta merged commit e69a504 into nvim-treesitter:master Oct 26, 2023
5 of 6 checks passed
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.

3 participants