3dyuval / 3dyuval/nvim

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

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

Descrição

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

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.