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

feat(feline): allow to hide lazy.nvim updates #731

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

vollowx
Copy link
Collaborator

@vollowx vollowx commented Jul 10, 2024

This PR added an option to hide the count of updatable plugins from lazy.nvim, and updated the documentations for feline.nvim.

Please check this out @ilias777 👀

@ilias777
Copy link
Contributor

ilias777 commented Jul 10, 2024

Really good and very clean. I like that. 👍🏻

@ilias777
Copy link
Contributor

ilias777 commented Jul 10, 2024

Or you can set a default value for show_lazy_updates to false and only if the users want this feature, they can enable it.

Keep in mind that this feature in lazy.nvim is under the checker table and it's by default set to false.

Only If this is set to true, it's available in feline with show_lazy_updates = true.

We need to clarify in the docs, that this option in lazy.nvim has to be also set to true.

require("lazy").setup({
    -- configuration
    checker = { enabled = true },
    -- configuration
}

I saw you have removed the has_lazy() function and at the line number 314 is checking for that function. Do we need the pcall, what do you think?

Copy link
Contributor

@ilias777 ilias777 left a comment

Choose a reason for hiding this comment

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

If we want to check for lazy.nvim installation, we need the has_lazy() function.

Otherwise the provider has to be:
provider = require("lazy.status").updates
without the parenthesis, like I mentioned above, but I can check it only if an update is available from a plugin.

@ilias777
Copy link
Contributor

ilias777 commented Jul 10, 2024

Ok, I tested it with your changes. I removed only the has_lazy() at line 314 and all works fine.

I like it 👍🏻

P.S.
If the provider is a function, then your code is right with the parenthesis at the end.

provider = function()
    return require('lazy.status').updates()
end,

If provider is not a function, than the parenthesis has to be removed.

provider = require('lazy.status').updates,

@vollowx
Copy link
Collaborator Author

vollowx commented Jul 11, 2024

So I will add more info to the docs, and I guess it's fine to merge after that?

Edit: hold on I just realized that I didn't upload all my changes... The has_lazy function should be replaced with pcall(require, "lazy") actually

@vollowx
Copy link
Collaborator Author

vollowx commented Jul 11, 2024

@ilias777 It should work normally now.

@ilias777
Copy link
Contributor

Yes, it works normally now. I testet it with the pcall in the if condition. Really good!

🙂👍🏻

@vollowx vollowx merged commit 7946d1a into main Jul 11, 2024
@vollowx vollowx deleted the feat/feline-improvements branch July 11, 2024 09:45
Jint-lzxy added a commit to Jint-lzxy/nvim that referenced this pull request Jul 14, 2024
---

Squashed commit of the following:

commit 7946d1a
Author: Vollow <[email protected]>
Date:   Thu Jul 11 17:45:39 2024 +0800

    feat(feline): allow to hide lazy.nvim updates (catppuccin#731)

    * feat(feline): allow to hide lazy.nvim updates

    * fix(feline): check if lazy.nvim exisis

    * feat(feline): disable lazy.nvim updates module by default
    docs(feline): document settings for lazy.nvim updates module

    * docs: auto generate vimdoc

    ---------

    Co-authored-by: vollowx <[email protected]>

commit 47bd419
Author: Ilias Dougias <[email protected]>
Date:   Wed Jul 10 15:29:28 2024 +0200

    feat(feline): add lazy.nvim updates module, replace deprecated API (catppuccin#725)

    * Add lazy.nvim plugin updates in feline
    * Use pcall for checking if lazy.nvim is installed
    * fix(feline): fix provider option for lazy updates
    * refactor(feline): update deprecated api functions

commit 2d3419c
Author: Daryl <[email protected]>
Date:   Mon Jul 8 17:40:11 2024 +0800

    fix!(leap): highlight group for `LeapLabel` (catppuccin#728)

    `LeapLabel` replaces `LeapLabelPrimary` and `LeapLabelSecondary`

    Signed-off-by: Platy <[email protected]>

commit 4ea0173
Author: Igor Lacerda <[email protected]>
Date:   Mon Jul 8 06:30:44 2024 -0300

    fix(dapui): border match bg color (catppuccin#727)

commit 1d76b57
Author: vollowx <[email protected]>
Date:   Sun Jul 7 19:54:00 2024 +0800

    Revert "fix: color float window border background (catppuccin#722)"

    This reverts commit 31fcfb0, as it
    breaks some of the UI.

commit 31fcfb0
Author: Vollow <[email protected]>
Date:   Fri Jun 28 01:41:51 2024 +0800

    fix: color float window border background (catppuccin#722)

commit 6827a67
Author: Evgeni Chasnovski <[email protected]>
Date:   Thu Jun 27 20:38:09 2024 +0300

    feat(mini): add new highlight groups (catppuccin#721)

commit 894efb5
Author: Tom Kuson <[email protected]>
Date:   Mon Jun 24 10:39:13 2024 +0100

    fix(defaults)!: Enable mini integration by default (catppuccin#718)

    The documentation says that mini is enabled by default, but it is not.
    This patch changes the defaults to match what is documented.

commit 67565cd
Author: Igor Lacerda <[email protected]>
Date:   Thu Jun 20 09:05:14 2024 -0300

    feat(csv): built-in rainbow highlighting (catppuccin#720)

commit c0bea77
Author: Mateus Alves <[email protected]>
Date:   Fri Jun 14 00:07:19 2024 -0300

    fix: small typo in feline.lua file (catppuccin#719)

commit cc8e290
Author: Thaumy <[email protected]>
Date:   Mon Jun 10 23:25:09 2024 +0800

    feat(bufferline): add `indicator_visible` and `modified_visible` (catppuccin#716)

commit afccb3d
Author: Igor Lacerda <[email protected]>
Date:   Mon Jun 10 12:24:29 2024 -0300

    fix(neogit): link WinSeparator (catppuccin#713)

commit 5215ea5
Author: MithicSpirit <[email protected]>
Date:   Sun May 26 02:29:20 2024 -0400

    Support new "Ok" diagnostics (catppuccin#708)

    * feat(native_lsp): support new "Ok" diagnostics

    Defaults to using the green color.

    This was not added to the "LspDiagnostic*" highlights since I could not
    find any documentation on whether the "Ok" diagnostic is implemented for
    those. Indeed, I could not find any documentation whatsoever on the
    LspDiagnostic* highlights (grepping the Neovim source turned up no
    mentions of them either).

    * doc(native_lsp): new "Ok" diagnostic

    Add documentation and type information for the new "Ok" diagnostic.

commit 4edca6b
Author: Myles Mo <[email protected]>
Date:   Sun May 26 14:22:31 2024 +0800

    feat(treesitter-content): highlight line number (catppuccin#709)

    * fix:(treesitter-content): respect transparency

    * chore: format

    ---------

    Co-authored-by: Myles Mo <[email protected]>
    Co-authored-by: mrtnvgr <[email protected]>

Signed-off-by: Jint-lzxy <[email protected]>
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