Home

Awesome

<p align="center"> <h1 align="center">key-analyzer.nvim</h2> </p> <p align="center"> Ever wondered which mappings are free to be mapped? Now it's a easier to figure it out. </p> <p align="center"> <img width="270" align="center" src="https://otivdev.ams3.cdn.digitaloceanspaces.com/api-automatic-uploads/prod/SameSize/screenshot_2024_11_03_at_02_06_20_mobile.png" /> </p>

⚡️ Features

📋 Installation

<div align="center"> <table> <thead> <tr> <th>Package manager</th> <th>Snippet</th> </tr> </thead> <tbody> <tr> <td>

folke/lazy.nvim

</td> <td>
require("lazy").setup({
    { "meznaric/key-analyzer.nvim", opts = {} },
})
</td> </tr> </tbody> </table> </div>

Usage

CommandDescription
:KeyAnalyzer <prefix> [mode]Shows keyboard analysis for the given prefix and mode. Mode defaults to normal ('n') if not specified.
:KeyAnalyzer <leader>Show <leader> mappings
:KeyAnalyzer <leader>bShow mappings starting with <leader>b*
:KeyAnalyzer <C-Show CTRL mappings
:KeyAnalyzer <C- vShow CTRL mappings in visual mode
:KeyAnalyzer <M-Show Alt/Meta/Option mappings
:KeyAnalyzer <M-Show Alt/Meta/Option mappings
:KeyAnalyzer <C-M>x iShow mappings starting with CTRL + M x in insert mode

:KeyAnalyzer calls this lua code: require('key-analyzer').show(prefix, mode) if you wish to map it yourself

Tip: Click or move to any key to see its mapping details

⚙ Configuration

Note: The options are also available in Neovim by calling :h key-analyzer.options

require("key-analyzer").setup({
    -- Name of the command to use for the plugin
    command_name = "KeyAnalyzer", -- or nil to disable the command
    
    -- Customize the highlight groups
    highlights = {
        bracket_used = "KeyAnalyzerBracketUsed",
        letter_used = "KeyAnalyzerLetterUsed", 
        bracket_unused = "KeyAnalyzerBracketUnused",
        letter_unused = "KeyAnalyzerLetterUnused",
        promo_highlight = "KeyAnalyzerPromo",
        
        -- Set to false if you want to define highlights manually
        define_default_highlights = true,
    },
})

Limitations

⌨ Contributing

PRs and issues are always welcome. Make sure to provide as much context as possible when opening one.

Few ideas:

Find it interesting? X Follow

Thanks to shortcuts for the plugin boilerplate <3