3dyuval / 3dyuval/nvim

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

Abierto
#59 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Fennel
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.