-
-
Notifications
You must be signed in to change notification settings - Fork 349
plugins/oil-git-status: init #3292
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0312925
to
0c3010b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0c3010b
to
584b1a9
Compare
pushed with a comment on how to successfully lazy load this plugin |
bcef5a7
to
3ab6924
Compare
ed2bd70
to
2d4ba0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your persistence, looks like this is nearly there 🚀
thank you :) you've been giving me really good reviews I really appreciate them |
bb12cca
to
fe8ff6c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
fe8ff6c
to
e109b87
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
e109b87
to
08dca3c
Compare
08dca3c
to
a2525d2
Compare
a2525d2
to
830c9c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
when = !config.plugins.oil.enable; | ||
message = '' | ||
This plugin requires `plugins.oil` to be enabled | ||
plugins.oil.enable = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kinda subjective, but if we interpolate the actual option, users will see either plugins.oil.enable
or programs.nixvim.plugins.oil.enable
depending on whether their nixvim configuration is a programs.nixvim
submodule.
This also has the advantage of ensuring no typos.
plugins.oil.enable = true; | |
${options.plugins.oil.enable} = true; |
To do this, you need the options
module arg of course.
Also, nit: I would indent the code example and add a colon to the end of the previous line, to be consistent with the other warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep I like that :)
when = !config.plugins.oil.settings.win_options.signcolumn or null != "yes:2,"; | ||
message = '' | ||
This plugin requires the following `plugins.oil` setting: | ||
plugins.oil.settings={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same optional/subjective suggestion:
plugins.oil.settings={ | |
${plugins.oil.settings} = { |
Also, nit: spaces around the =
please 🙂
''; | ||
} | ||
{ | ||
when = !config.plugins.oil.settings.win_options.signcolumn or null != "yes:2,"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: is this the only supported valid string, or are there other values that'd work?
E.g. would it be more correct to check lib.strings.hasInfix "yes:2" signcolumn
?
I'm unfamiliar with oil, but the value looks suspiciously like something that can be configured with more complex syntax and still work for oil-git-status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so 2 would be min number of sign columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it valid to e.g. have something like "yes:2,3"
or "yes:2,10"
to have a min & max?
If so, maybe we want lib.strings.hasPrefix "yes:2,"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's valid . the generated lua is this
require("oil").setup({ win_options = { signcolumn = "yes:2" } })
it has to be a number bigger than 2 I think I could skip that ,
to avoid confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could use lib.strings,hasPrefix "yes:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried to run the tests without the ,
and they pass as well so I'd saw we are good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once it gets generated to lua it's already stripped
Is there a custom option apply
function doing that? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be part of the translation layer, like since in this case it's only that value being set it might just get stripped to prevent a typo or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any custom behaviour in the option declaration:
nixvim/plugins/by-name/oil/default.nix
Line 249 in 36d63a7
signcolumn = helpers.defaultNullOpts.mkStr "no" ""; |
might be part of the translation layer,
If you mean the lua translation layer, that's not relevant to your warning. You are reading the option value (i.e. a nix value) not the rendered lua.
830c9c8
to
37a6d08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one whitespace nit and a rebase needed, then I think its good to merge.
Once the whitespace is fixed, can you fetch our repo and rebase onto main?
git fetch --all
git rebase upstream/main
git push --force-with-lease
Thanks for your hard work on this!
37a6d08
to
aa1ae69
Compare
nah man thank you for bearing with me, sometimes I can be a bit intense, and thanks for the reviews they were extremely helpful and I got to learn a lot from this :) |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at aa1ae69 |
This pull request, with head sha This pull request will be automatically closed by GitHub.As soon as GitHub detects that the sha It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch |
this PR adds oil-git-status to nixvim, since it recently got into master branch of nixpkgs
https://github.com/refractalize/oil-git-status.nvim