Commit graph

3 commits

Author SHA1 Message Date
Folke Lemaitre
583a0c1c06
fix: keymap docs 2025-10-26 14:57:03 +01:00
Folke Lemaitre
b0f21fa745
feat(keymap): added new enabled option 2025-10-26 12:19:40 +01:00
Folke Lemaitre
0bf34afe34
feat(keymap): add filetype and LSP-aware keymap management
Add `Snacks.keymap.set()` and `Snacks.keymap.del()` as enhanced alternatives
to `vim.keymap.set/del` with support for:

- **Filetype-specific keymaps**: Set keymaps that only apply to buffers with
  specific filetypes using the `ft` option
- **LSP-aware keymaps**: Set keymaps based on LSP client capabilities using
  the `lsp` option (leverages Snacks.util.lsp)
- **Automatic application**: Keymaps are applied to existing buffers and
  automatically set up for new buffers via FileType autocmd

Drop-in replacement API with smart defaults (silent by default).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 16:32:11 +02:00