goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.78k stars 104 forks source link

feat: add an option to pass keymaps #202

Closed nenikitov closed 1 year ago

nenikitov commented 1 year ago

This plugin binds <CR> and <M-CR> by default, which can conflict with custom keymaps. This MR adds an option to change these default mappings by passing new argument in setup().

Previous binds are now default values for these options. Values can be either a string or a list of strings (one or many mappings), or nil (remove mapping).

Here is an example configuration:

require('alpha').setup {
    ...,
    opts = {
        keymap = {
            -- Press action is now triggered for both "ENTER" and "l"
            press = { '<CR>', 'l' },
            -- Queue press is removed
            queue_press = nil
        }
    }
}
goolord commented 1 year ago

looks good! thanks for your contribution 🖤