Skip to content

Conversation

@saygo-png
Copy link
Contributor

#3682 (comment)

It also cleans up the generate script a bit so we no longer have to repeat the name and the files always have the .json extension even in the nix derivation.

Didn't touch the maintainers script because I can't nor want to read Python.

Copy link
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

Nice!

# Get file part from filepath and remove hash prefix
output_name=$(basename "$1" | cut -d "-" -f "2-")
basename "$1" ".json"
prettier "$1" > "$generated_dir/$output_name"
Copy link
Member

Choose a reason for hiding this comment

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

Aside: directly calling prettier in the update-script probably isn't the best design. Really, we should be using our treefmt configuration, so that we also get any settings (etc). But doing that without having to evaluate the rest of nixvim's flake may be non-trivial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree but out of scope for this PR. Though in practice our treefmt prettier is the same as this one for JSON files but of course this would help keep it in sync in the future.

Copy link
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

We should avoid taking pkgs as an argument in callPackage functions.

@MattSturgeon MattSturgeon added this pull request to the merge queue Oct 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2025
@MattSturgeon
Copy link
Member

MattSturgeon commented Oct 19, 2025

cancelled (Master Shutdown)
-- https://buildbot.nix-community.org/#/builders/26/builds/7198

Sounds like buildbot is rebooting

@MattSturgeon MattSturgeon added this pull request to the merge queue Oct 19, 2025
@zowoq
Copy link
Contributor

zowoq commented Oct 19, 2025

Sounds like buildbot is rebooting

Yes, sorry. I'll re-queue this PR.

@zowoq zowoq removed this pull request from the merge queue due to a manual request Oct 19, 2025
@zowoq zowoq added this pull request to the merge queue Oct 19, 2025
Merged via the queue into nix-community:main with commit c89994b Oct 19, 2025
4 checks passed
@saygo-png saygo-png deleted the use-json branch October 25, 2025 08:08
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