NvChad / NvChad

Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience.
https://nvchad.com/
GNU General Public License v3.0
24.86k stars 2.13k forks source link

mappings cheetsheet #244

Closed siduck closed 3 years ago

siduck commented 3 years ago

mappings cheetsheet popup ( not whichkey )

G-Rowell commented 3 years ago

I've done a bit or work on this! I'd love to be the assignee & one to do it :smile:

siduck commented 3 years ago

I've done a bit or work on this! I'd love to be the assignee & one to do it

could you show how does it look? I wouldnt want to use cheatsheet.nvim either

something like this but styled with Highstr.nvim

https://spacebums.co.uk/images/awesomewm/awesome_helper.jpg

G-Rowell commented 3 years ago

That isn't interactive and don't see how it looks remotely as good or remotely as functional! as cheatsheet.nvim, there also certainly won't be enough space to show all the NvChad mappings if we set it like that image you provided

siduck commented 3 years ago

That isn't interactive and don't see how it looks remotely as good or remotely as functional! as cheatsheet.nvim, there also certainly won't be enough space to show all the NvChad mappings if we set it like that image you provided

I'll try doing this myself and let you know , if it wont work out then we will go with cheatsheet.nvim

siduck commented 3 years ago

HighStr.nvim didnt go well , so I'll test cheatsheet.nvim

so far :Cheatsheet looks like this

image

siduck commented 3 years ago

Ok so I think we can do this without using any plugin. The main concept is to loop through the mapping table in chadrc , this way it is dynamic too + no need to define mappings in some file.

siduck commented 3 years ago

Concept

image

image

siduck commented 3 years ago

Ok so I think we can do this without using any plugin. The main concept is to loop through the mapping table in chadrc , this way it is dynamic too + no need to define mappings in some file.

@Akianonymus what do you think of this?

siduck commented 3 years ago
for index, data in pairs(mappings) do
    print("\n")
    print(index .. "\n")

    for key, val in pairs(data) do
        print(key, "  |  " .. val)
    end
end

image

Akianonymus commented 3 years ago

Ok so I think we can do this without using any plugin. The main concept is to loop through the mapping table in chadrc , this way it is dynamic too + no need to define mappings in some file.

@Akianonymus what do you think of this?

Fetching the mappings isn't a problem, mainly how to make the floating window and stuff.

siduck commented 3 years ago

Ok so I think we can do this without using any plugin. The main concept is to loop through the mapping table in chadrc , this way it is dynamic too + no need to define mappings in some file.

@Akianonymus what do you think of this?

Fetching the mappings isn't a problem, mainly how to make the floating window and stuff.

https://github.com/fhill2/floating.nvim#readme

G-Rowell commented 3 years ago

I think we're reinventing the wheel here imo

There are already plugins to display mappings

siduck commented 3 years ago

I think we're reinventing the wheel here imo

There are already plugins to display mappings

only whichkey is dynamic but its annoying to use .

https://github.com/sudormrfbin/cheatsheet.nvim/issues/7 if this gets resolved then we'll use this.

G-Rowell commented 3 years ago

I think we're reinventing the wheel here imo

There are already plugins to display mappings

only whichkey is dynamic but its annoying to use .

https://github.com/sudormrfbin/cheatsheet.nvim/issues/7 if this gets resolved then we'll use this.

So those are for sure fair points

But I think the ideal solution is to make a PR upstream to provide that functionality, rather than make our own new plugin

siduck commented 3 years ago

I think we're reinventing the wheel here imo There are already plugins to display mappings

only whichkey is dynamic but its annoying to use . sudormrfbin/cheatsheet.nvim#7 if this gets resolved then we'll use this.

So those are for sure fair points

But I think the ideal solution is to make a PR upstream to provide that functionality, rather than make our own new plugin

yes ,we could add a PR to cheatsheet.nvim only