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

plugins/fidget: migrate to mkNeovimPlugin #2647

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HeitorAugustoLN
Copy link
Member

@HeitorAugustoLN HeitorAugustoLN commented Dec 12, 2024

  • Migrated fidget.nvim to mkNeovimPlugin
  • Added renames from old options to new ones (with the exception of the submodules, because I didn't find a way to)
  • Added new options, etc.
  • Updated tests to new format too

@HeitorAugustoLN HeitorAugustoLN force-pushed the fidget-migrate branch 3 times, most recently from ce3e947 to a37c6e3 Compare December 12, 2024 23:41
@HeitorAugustoLN HeitorAugustoLN marked this pull request as ready for review December 12, 2024 23:46
@HeitorAugustoLN HeitorAugustoLN force-pushed the fidget-migrate branch 5 times, most recently from 2223c95 to e433354 Compare December 13, 2024 00:22
@HeitorAugustoLN HeitorAugustoLN force-pushed the fidget-migrate branch 2 times, most recently from 5992d4b to 063fb6b Compare December 16, 2024 19:25
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Show resolved Hide resolved
plugins/by-name/fidget/default.nix Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/deprecations.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/deprecations.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/deprecations.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/deprecations.nix Outdated Show resolved Hide resolved
@HeitorAugustoLN HeitorAugustoLN force-pushed the fidget-migrate branch 3 times, most recently from 2ae72d4 to 1f1f01f Compare December 17, 2024 06:55
Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

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

Thanks for tackling one of the more bloated plugins, should be good overall.

@HeitorAugustoLN HeitorAugustoLN force-pushed the fidget-migrate branch 2 times, most recently from c0a0789 to 73c7489 Compare December 24, 2024 06:34
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.

Looks like some minor tidying up and it should be good from my perspective. Thanks for working on this!

Comment on lines 474 to 576
"pollRate"
"suppressOnInsert"
"ignoreDoneAlready"
"ignoreEmptyMessage"
"notificationGroup"
"clearOnDetach"
"ignore"
];
progressDisplayOptions = [
"renderLimit"
"doneTtl"
"doneIcon"
"doneStyle"
"progressTtl"
"progressIcon"
"progressStyle"
"groupStyle"
"iconStyle"
"priority"
"skipHistory"
"formatMessage"
"formatAnnote"
"formatGroupName"
"overrides"
];
notificationOptions = [
"pollRate"
"filter"
"historySize"
"overrideVimNotify"
"configs"
"redirect"
];
notificationViewOptions = [
"stackUpwards"
"iconSeparator"
"groupSeparator"
"groupSeparatorHl"
];
notificationWindowOptions = [
"normalHl"
"winblend"
"border"
"borderHl"
"zindex"
"maxWidth"
"maxHeight"
"xPadding"
"yPadding"
"align"
"relative"
];
in
[
[
"progress"
"lsp"
"progressRingbufSize"
]
[
"integration"
"nvim-tree"
"enable"
]
[
"logger"
"level"
]
[
"logger"
"floatPrecision"
]
[
"logger"
"path"
]
]
++ (map (oldOption: [
"progress"
oldOption
]) progressOptions)
++ (map (oldOption: [
"progress"
"display"
oldOption
]) progressDisplayOptions)
++ (map (oldOption: [
"notification"
oldOption
]) notificationOptions)
++ (map (oldOption: [
"notification"
"view"
oldOption
]) notificationViewOptions)
++ (map (oldOption: [
"notification"
"window"
oldOption
]) notificationWindowOptions);
Copy link
Member

Choose a reason for hiding this comment

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

It'd be nice for this to also be in deprecations.nix.

Perhaps we could restructure that file, so that instead of being a module it is an attrset with optionsRenamedToSettings and imports that can then be used in this file?

Copy link
Member Author

Choose a reason for hiding this comment

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

I implemented it, don't know if I did the right way though

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is good now

Comment on lines 554 to 557
++ (map (oldOption: [
"progress"
oldOption
]) progressOptions)
Copy link
Member

Choose a reason for hiding this comment

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

Note: these outer parens are not needed in concatenation. Also, the new nixfmt rules should allow the list to be on one line, because it is being applied as a function-arg:

Suggested change
++ (map (oldOption: [
"progress"
oldOption
]) progressOptions)
++ map (oldOption: [ "progress" oldOption ]) progressOptions

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess the current package version is not up-to-date

Copy link
Member

Choose a reason for hiding this comment

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

Nixfmt is definitely up to date. Could just be the line ends up being too long, so the formatter insists on having a multiline list.

plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
Comment on lines +10 to +16
mkRemovedOptionModule
[
"plugins"
"fidget"
oldOption
]
''
Copy link
Member

Choose a reason for hiding this comment

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

Not 100% sure, but I think the new nixfmt rules allow us to use:

Suggested change
mkRemovedOptionModule
[
"plugins"
"fidget"
oldOption
]
''
mkRemovedOptionModule [ "plugins" "fidget" oldOption ] ''

plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
plugins/by-name/fidget/default.nix Outdated Show resolved Hide resolved
@HeitorAugustoLN HeitorAugustoLN force-pushed the fidget-migrate branch 3 times, most recently from d39848c to e6db071 Compare December 28, 2024 19:56
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