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(conform-nvim): fix formatters_by_ft definitions #1129

Merged
merged 7 commits into from
Jul 25, 2024

Conversation

lucazz
Copy link
Contributor

@lucazz lucazz commented Jul 24, 2024

📑 Description

As requested by @Uzaaft on #1127 #1128, I'm merging all changes in a single PR.

This PR updates stevearc/conform.nvim's setup, addressing the deprecation warning that comes up when opening any yaml file while using the yaml pack:

deprecated[conform]: The nested {} syntax to run the first formatter has been replaced by the stop_after_first option (see :help conform.format).
Support for the old syntax will be dropped on 2025-01-01.

Copy link

github-actions bot commented Jul 24, 2024

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • Proper usage of opts table rather than setting things up with the config function.

  • Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

@Uzaaft
Copy link
Member

Uzaaft commented Jul 24, 2024

@lucazz I’m about to head to bed so I cant deep dive into it, but based upon the warning you have this seem wrong.

Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

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

This is incorrect, all of them should be

{ "prettierd", "prettier", stop_after_first = true }

@lucazz
Copy link
Contributor Author

lucazz commented Jul 25, 2024

Heya @Uzaaft & @mehalter, sure thing added stop_after_first

@Uzaaft
Copy link
Member

Uzaaft commented Jul 25, 2024

@lucazz Why did you add it to the places where it's not needed?

@lucazz
Copy link
Contributor Author

lucazz commented Jul 25, 2024

Let me take those out, @Uzaaft I thought it wouldn't hurt to have them in place. hold on

@Uzaaft
Copy link
Member

Uzaaft commented Jul 25, 2024

Danke Danke

@lucazz
Copy link
Contributor Author

lucazz commented Jul 25, 2024

Danke Danke

Alright, done and done :-)

@lucazz lucazz force-pushed the fix/conform-nvim branch 2 times, most recently from a290453 to 7745354 Compare July 25, 2024 12:45
lua/astrocommunity/pack/go/init.lua Outdated Show resolved Hide resolved
lua/astrocommunity/pack/markdown/init.lua Outdated Show resolved Hide resolved
lua/astrocommunity/pack/python-ruff/init.lua Outdated Show resolved Hide resolved
lua/astrocommunity/pack/python/init.lua Outdated Show resolved Hide resolved
lucazz and others added 4 commits July 25, 2024 10:04
Co-authored-by: Micah Halter <micah@mehalter.com>
Co-authored-by: Micah Halter <micah@mehalter.com>
Co-authored-by: Micah Halter <micah@mehalter.com>
Co-authored-by: Micah Halter <micah@mehalter.com>
@lucazz lucazz requested a review from mehalter July 25, 2024 13:06
Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

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

Ok, I think this looks correct now, thanks! Just to clarify why the previous ones were incorrect. The nested structure indicated when to only stop at the first. The ones that were not previously nested indicated multiple formatters so we very much do not want them to stop at the first

@mehalter mehalter merged commit e7de18b into AstroNvim:main Jul 25, 2024
15 checks passed
@lucazz lucazz deleted the fix/conform-nvim branch July 25, 2024 13:44
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