3dyuval / 3dyuval/nvim

Revert surround keymaps to nvim-surround defaults (ds/cs)

Đang mở
#59 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Fennel
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Goal
Remove the Graphite translation layer for surround delete/change operations.
Use nvim-surround defaults (`ds`, `cs`) instead of custom `xs`, `ws` mappings.

## Why
The `ws` mapping has known layering issues (`w→c` remap intercepts before `ws` is recognized).
Using defaults is simpler, more consistent with documentation/tutorials, and avoids the complexity of maintaining a translation layer for surround operations.

## Changes Required

### 1. `lua/plugins/surround.lua`
- Remove Graphite `ws` → `(nvim-surround-change)` mapping (line 135)
- Remove Graphite `xs` → `(nvim-surround-delete)` mapping (line 136)
- Remove `xst` feedkeys wrapper (lines 137-139)
- Remove `xs`, `ws` from buffer exclusion `keymaps_to_disable` list (line 157)
- Remove the TODO comment block about `ws` layering issues (lines 129-134)

### 2. `lua/config/keymaps-surround.lua`
- Remove `x.s` group (delete surround via Graphite, lines 35-48)
- Remove `w.s` group (change surround via Graphite, lines 49-62)
- Keep `d.s` and `c.s` groups (these document the defaults)
- Keep `y.s` group (add surround — already default)

### 3. `lua/config/tests/surround/test.lua`
- Remove `describe("graphite mappings (xs, ws)")` test block (lines 282-299)
- Keep all `ds`, `cs`, `ys` default tests (they already pass)

### 4. `.claude/skills/nvim-config/references/surround.md`
- Remove "Delete (Graphite: X=delete)" section with `xs`/`xst`
- Remove "Change (Graphite: W=change)" section with `ws`
- Remove "Known Issues" section about `ws` layering
- Keep default `ds`, `cs`, `ys` documentation

### 5. `lua/config/keymaps-old.lua`
- No changes needed (the `w→c` and `x→d` global remaps stay — they just won't be used for surround anymore)

## Result
- `ds{char}` = Delete surround (nvim-surround default)
- `cs{old}{new}` = Change surround (nvim-surround default)
- `ys{motion}{char}` = Add surround (already default)
- `S{char}` = Visual surround (already default)

## Supersedes
Closes #54

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.