Skip to content

Add support for name field for plugins (as does not work anymore) and modularisation guide when using plugins folder and separate plugin .lua files inside of it #60

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

Open
Emcho0 opened this issue Feb 23, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Emcho0
Copy link

Emcho0 commented Feb 23, 2025

Anyone who wants to migrate from packer.nvim to pckr.nvim has encountered an issue where the aliased plugin name won't show up:

{ "catppuccin/nvim", as = "catppuccin" }

A more intuitive and readable approach would be to use a name field, similar to how packer.nvim allowed aliasing:

require("pckr").add {
    {
        "catppuccin/nvim",
        name = "catppuccin"
        -- config options for the plugin
    };
    -- other plugins
}

This would improve readability and make it easier for users switching from packer.nvim to pckr.nvim.

And besides that, I think that there should be an ability in require('pckr').add to have inside of it require('path_to_plugin_spec_folder') folder or similar so that it can load each and every plugin .lua file inside of that folder.

Example code snippet:

require("pckr").add {
    require("path_to_plugin_spec_folder") 
    -- or
    "path_to_plugin_spec_folder"
}

This would improve the modularity of each and every plugin .lua file, and would have the similar spec when declaring it without a plugin folder.

@Emcho0 Emcho0 added the enhancement New feature or request label Feb 23, 2025
@Emcho0 Emcho0 changed the title Add support for name field for plugins (as does not work anymore) Add support for name field for plugins (as does not work anymore) and modularisation guide when using plugins folder and separate plugin .lua files inside of it Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant