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: Use show-line-numbers instead of line-numbers #5

Merged
merged 7 commits into from
Apr 3, 2024
Merged

fix: Use show-line-numbers instead of line-numbers #5

merged 7 commits into from
Apr 3, 2024

Conversation

Jaezmien
Copy link
Contributor

@Jaezmien Jaezmien commented Apr 2, 2024

πŸ“‘ Description

Fixes an issue where line_numbers would throw an error since the parameter is --show-line-numbers

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation

Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

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

Why not just change the allowed options from line_numbers to show_line_numbers.

@Jaezmien
Copy link
Contributor Author

Jaezmien commented Apr 3, 2024

Why not just change the allowed options from line_numbers to show_line_numbers.

Just recently realized this, but even with that - it doesn't work all the time.

See:
image
image

--show-line-numbers doesn't take in a value, so freeze tries to use the appended true as an argument
image

This is why I forced line_numbers to return the parameter instead.

(Sorry, accidentally pressed close pull request!)

@Jaezmien Jaezmien closed this Apr 3, 2024
@Jaezmien Jaezmien reopened this Apr 3, 2024
@isabelroses
Copy link
Member

--show-line-numbers doesn't take in a value, so freeze tries to use the appended true as an argument

if thats the case then that means this is an issue with how handling boolean flags should work because then the window option for example should fail.

@isabelroses
Copy link
Member

isabelroses commented Apr 3, 2024

Just fixed the boolean options with e76bf9f, hopefully you can try merge with main and test the suggested changes.

@Jaezmien
Copy link
Contributor Author

Jaezmien commented Apr 3, 2024

It works! But now I'm a bit worried about options that are inside tables, since it doesn't seem like they're handled with this change (e.g. font.ligatures)

@isabelroses
Copy link
Member

It works! But now I'm a bit worried about options that are inside tables, since it doesn't seem like they're handled with this change (e.g. font.ligatures)

oh, thats a good catch.

@isabelroses
Copy link
Member

It works! But now I'm a bit worried about options that are inside tables, since it doesn't seem like they're handled with this change (e.g. font.ligatures)

oh, thats a good catch.

that should be fixed by 471ab9e now.

@Jaezmien
Copy link
Contributor Author

Jaezmien commented Apr 3, 2024

I've also tried rewriting M.get_arguments a little bit with f2af188 - would this work better?

@Jaezmien
Copy link
Contributor Author

Jaezmien commented Apr 3, 2024

Ah! I've forgotten that tables also prepend the current table key to the parameter. I think that yours actually work right now! (Though currently the config and test still refers to line_numbers instead of show_line_numbers)

@isabelroses
Copy link
Member

I've also tried rewriting M.get_arguments a little bit with f2af188 - would this work better?

I believe that it currently fails to call the command since it can parse the font but then it trys to call --family when it should call --font.family

Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

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

Cool, the latest changes seem to work and pass all the tests, if you can correct the merge confits we should be good to merge.

Copy link
Member

@isabelroses isabelroses left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution <3

@isabelroses isabelroses merged commit b4c80e6 into charm-and-friends:main Apr 3, 2024
1 check 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.

2 participants