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

#284 unconditionally remove leading and trailing lines from code blocks #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidmdm
Copy link

This implements as far as I can tell, the change needed for this issue.

Unclear as to how where tests live at this time, but running go test ./... seems to still be working.

@davidmdm
Copy link
Author

@mvdan Can you take a look at this?

@flan6
Copy link

flan6 commented Jan 17, 2024

ive been using this pr for a while on some projects and it indeed works. =) Thanks @davidmdm

@davidmdm
Copy link
Author

@flan6 I would love this to be merged so that we can get it integrated into gopls. I have to build my own branch of gopls to get the automatic formatting behavior that I want :(

@flan6
Copy link

flan6 commented Apr 1, 2024

@davidmdm hi! have you seen what @mvdan said about this pr on issue #284? I'm not sure if you should do it or me ._.

@davidmdm
Copy link
Author

davidmdm commented Apr 2, 2024

Hi @flan6,

I saw it, however I don't have the bandwidth personally to figure out how to do the look ahead to figure out if the block precedes an if-else or else block.

Also, personally, I prefer the current behaviour where all blocks are pruned of newlines.

These things combined mean that I haven't had the time or motivation to address @mvdan's review.

If you're able to carry it through that would be great. Otherwise I'll try and get to it eventually but it won't necessarily be in the next month or so.

@flan6
Copy link

flan6 commented Apr 4, 2024

Also, personally, I prefer the current behaviour where all blocks are pruned of newlines.

I see, and I agree with you about the rule. But nonetheless it is a great improvement over what it was before. And I am very grateful for your effort so far!
I'll try to carry it on and achieve what mdvan requested and i will surely let you know about the outcome!

Again, thank you so much

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