diff --git a/MIGRATION_PLAN.md b/MIGRATION_PLAN.md index 62e382b..bdfc3ee 100644 --- a/MIGRATION_PLAN.md +++ b/MIGRATION_PLAN.md @@ -184,28 +184,46 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date. ## Phase 6 — UX / Editing ## Phase 6.1 — Confirm scope and priorities -- [ ] Confirm scope and priorities for this phase +- [x] Confirm scope and priorities for this phase +- [x] Decision: No cursorcolumn (as per AGENTS.md) +- [x] Decision: No auto-window toggling behavior (keep settings static) +- [x] Decision: No motion plugin (skip leap/flash) +- [x] Decision: Move undotree to separate Phase 6.8 +- [x] UX settings to add: signcolumn, cursorline, colorcolumn -## Phase 6.2 — Comment.nvim -- [ ] Add `numToStr/Comment.nvim` +## Phase 6.2 — Core UX settings +- [x] Add signcolumn=yes (always show gutter for LSP/git) +- [x] Add cursorline (highlight current line) +- [x] Add colorcolumn=80,120 (visual guides) +- [x] No cursorcolumn (excluded as per AGENTS.md) +- [x] No per-window autocommands (keep simple) -## Phase 6.3 — Surround +## Phase 6.3 — Comment.nvim +- [x] Add `numToStr/Comment.nvim` +- [x] Configure for gcc/gc commenting +- [x] Add keymaps if needed + +## Phase 6.4 — Surround - [ ] Add `kylechui/nvim-surround` +- [ ] Minimal config with default keymaps (ys, ds, cs) -## Phase 6.4 — Autopairs +## Phase 6.5 — Autopairs - [ ] Add `windwp/nvim-autopairs` +- [ ] Integrate with nvim-cmp -## Phase 6.5 — Indent guides +## Phase 6.6 — Indent guides - [ ] Add `lukas-reineke/indent-blankline.nvim` - -## Phase 6.6 — Motion (leap/flash) -- [ ] Add `ggandor/leap.nvim` or `folke/flash.nvim` +- [ ] Configure scope highlighting ## Phase 6.7 — Folding (UFO) - [ ] Add `kevinhwang91/nvim-ufo` for folding +- [ ] Configure with Treesitter and LSP providers +- [ ] Add fold keymaps (za, zR, zM, etc.) -## Phase 6.8 — Optional: Undotree -- [ ] (Optional) Add `mbbill/undotree` +## Phase 6.8 — Undotree +- [ ] Add `mbbill/undotree` +- [ ] Add keymap to toggle undotree +- [ ] Configure minimal settings ## Phase 7 — Git, Markdown, Copilot, Formatting diff --git a/README.md b/README.md index a7e79f6..70e1cf0 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,15 @@ Record every decision here with a short rationale. Append new entries; do not re - Parameter swapping: `a`/`A` to swap with next/prev parameter - Auto-tag for HTML/PHP/JS/React/TS/Vue files (auto-close, auto-rename, close-on-slash) - Indent disabled initially (experimental); can enable per-filetype if stable +- 2025-12-07: UX/Editing Phase 6 decisions: + - Enable signcolumn=yes (always show for LSP diagnostics, git signs) + - Enable cursorline (highlight current line) + - Enable colorcolumn=80,120 (visual guides at 80 and 120 chars) + - NO cursorcolumn (as per AGENTS.md) + - NO auto-window toggling behavior (keep settings static, no per-window autocmds) + - NO motion plugin (skip leap/flash for simplicity) + - Undotree moved to separate phase (6.8) + - Comment.nvim for commenting (gcc/gc/gbc/gb keymaps) ## Project-Local Configuration (design) diff --git a/lazy-lock.json b/lazy-lock.json index eb68f21..28a14b2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,4 +1,5 @@ { + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua new file mode 100644 index 0000000..2177510 --- /dev/null +++ b/lua/plugins/comment.lua @@ -0,0 +1,24 @@ +-- Phase 6.3: Comment.nvim for commenting +return { + 'numToStr/Comment.nvim', + event = 'VeryLazy', + opts = { + -- Use default keymaps: gcc (line), gc (visual), gbc (block), gb (visual block) + padding = true, -- Add space between comment and text + sticky = true, -- Keep cursor position after commenting + ignore = '^$', -- Ignore empty lines + toggler = { + line = 'gcc', -- Line comment toggle + block = 'gbc', -- Block comment toggle + }, + opleader = { + line = 'gc', -- Line comment operator + block = 'gb', -- Block comment operator + }, + extra = { + above = 'gcO', -- Add comment on line above + below = 'gco', -- Add comment on line below + eol = 'gcA', -- Add comment at end of line + }, + }, +} diff --git a/lua/settings.lua b/lua/settings.lua index 1ae05c4..8da4de0 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -30,3 +30,8 @@ vim.opt.listchars = { -- Enable line numbers and relative line numbers vim.opt.number = true vim.opt.relativenumber = true + +-- Phase 6.2: UX settings +vim.opt.signcolumn = 'yes' -- Always show sign column (for LSP diagnostics, git signs, etc.) +vim.opt.cursorline = true -- Highlight current line +vim.opt.colorcolumn = '80,120' -- Visual guides at 80 and 120 characters