3dyuval / 3dyuval/nvim

Add comprehensive keymap testing via checkhealth

Open
#26 1 comment 0 reactions 0 assignees View on GitHub
task
Dominant language
Fennel
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## 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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.