3dyuval / 3dyuval/nvim

Add comprehensive keymap testing via checkhealth

Aberta
#26 1 comentário 0 reações 0 responsáveis Ver no GitHub
task
Linguagem predominante
Fennel
Estrelas
0
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## Summary
Add comprehensive keymap testing infrastructure that integrates with `:checkhealth` to systematically detect and resolve keymap conflicts, especially the overlapping keymaps identified by which-key.

## Current State
The `:checkhealth which-key` command shows multiple overlapping keymap warnings:
- `` overlaps with `` (Delete vs Delete surrounding)
- `` overlaps with `` (Change vs Change surrounding)
- `` has extensive overlaps with LSP and other mappings
- `` overlaps with fold commands
- `` overlaps with dashboard and surrounding commands
- Visual/operator mode conflicts with ``, ``, ``, ``
- Leader key conflicts in `q` group

## Proposed Solution
1. **Create keymap health check module** (`lua/config/health.lua`)
- Integrate with Neovim's `:checkhealth` system
- Detect overlapping keymaps systematically
- Provide actionable recommendations

2. **Enhance existing test infrastructure**
- Extend `lua/config/test-utils/test_keymaps.lua` for health integration
- Add conflict resolution suggestions
- Test against actual loaded keymaps in headless mode

3. **Create keymap conflict resolution guide**
- Document Graphite layout conflicts (HAEI vs hjkl, rt vs ia)
- Provide migration strategies for overlapping keys
- Establish keymap naming conventions

4. **Add automated testing**
- Include keymap health checks in CI pipeline (`.github/workflows/test.yml`)
- Add `make check-keymaps` target to `Makefile`
- Ensure no regressions in keymap assignments

## Implementation Tasks
- [ ] Create `lua/config/health.lua` with `check()` function
- [x] Enhance `test_keymaps.lua` for health check integration
- [x] Add keymap conflict detection to CI pipeline
- [ ] Document resolution strategies for each conflict type
- [ ] Test health check integration with `:checkhealth config`
- [ ] Add `make check-keymaps` and `make fix-keymaps` targets

## Acceptance Criteria
- `:checkhealth config` shows comprehensive keymap analysis
- All overlapping keymaps are documented with resolution strategies
- CI pipeline includes keymap conflict detection
- Zero critical keymap conflicts (warnings acceptable if documented)
- Health check provides actionable next steps

## Related
- Builds on testing infrastructure from PR #25
- Addresses Graphite layout conflicts mentioned in AGENTS.md
- Integrates with existing `lua/config/test-utils/test_keymaps.lua`

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.