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

[lazy.nvim] change keys options so it behave more like the actual plugin #2348

Open
idjoo opened this issue Oct 1, 2024 · 5 comments
Open

Comments

@idjoo
Copy link

idjoo commented Oct 1, 2024

Upon using the lazy.nvim plugin, i'm having a hardtime using the keys option and upon inspecting the other plugin manager it seems that lz-n have a more easier and more proper ways of using the keys option. Therefor is it okay to change the option to the one in lz-n?

keys =
with lib.types;
helpers.mkNullOrOption (maybeRaw (either str (listOf str))) "Lazy-load on key mapping";

keys = nixvim.mkNullOrOption' {
type = types.listOf types.anything;
description = ''
Lazy-load on key mapping. Mode is `n` by default.
'';
example = [
"<C-a>"
[
"<C-x>"
"g<C-x>"
]
{
__unkeyed-1 = "<leader>fb";
__unkeyed-2 = "<CMD>Telescope buffers<CR>";
desc = "Telescope buffers";
}
{ __raw = "{ '<leader>ft', '<CMD>Neotree toggle<CR>', desc = 'NeoTree toggle' }"; }
];
};

If this is okay i can make a PR on this, cause i would love to see this feature and use it immediately in my current nixvim configuration.

@MattSturgeon
Copy link
Member

Note: there's already a PR open that is doing some major refactoring to the lazy plugin: #2082

It's been a bit slow going, since the plugin is rather complex and we're trying to get it done right.

Ideally, the keys option should reflect the upstream plugin's option, so if you're saying it doesn't then we should resolve that.

Just be aware, any work we do now will conflict with the work that @my7h3le has already started.

@idjoo
Copy link
Author

idjoo commented Oct 1, 2024

Ok got it, thanks for the info. I'll just wait for the refactoring to be done first, then work on the options so it reflects the upstream plugin's option.

@my7h3le
Copy link

my7h3le commented Oct 1, 2024

So using the existing keys option was an issue I also found myself, and I was planning on refactoring that as well to match how you would set key maps in nixvim as a part of the #2082 PR 🙂.

I haven’t had a chance to work on it lately though, as I’ve been pretty busy these past couple of days but I should have some more free time this weekend, and should be able to get something up that’ll warrant a review

@my7h3le
Copy link

my7h3le commented Oct 1, 2024

I can mention you @idjoo in a comment on the relevant bits of the code for the keys option refactor in the #2082 PR once I get that up

@idjoo
Copy link
Author

idjoo commented Oct 1, 2024

I can mention you @idjoo in a comment on the relevant bits of the code for the keys option refactor in the #2082 PR once I get that up

sounds good, looking forward to that 😁

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

No branches or pull requests

3 participants