remove oil and plan neovim 0.12 upgrade

This commit is contained in:
Ray Elliott 2026-10-27 15:01:42 +00:00
commit 0e257cc231
8 changed files with 184 additions and 195 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@ autoload/
undodir/* undodir/*
.vimtmp/* .vimtmp/*
legacy/.vimtmp/ legacy/.vimtmp/
.nvimlog
view/* view/*
tmpdir tmpdir
WORKSPACE_TEST/ WORKSPACE_TEST/

View file

@ -8,7 +8,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
- Modern Lua-first config; avoid Vimscript unless explicitly requested. - Modern Lua-first config; avoid Vimscript unless explicitly requested.
- Keep it minimal, fast, and maintainable. - Keep it minimal, fast, and maintainable.
- Base plugin management on `lazy.nvim` with modular plugin specs. - Base plugin management on `lazy.nvim` with modular plugin specs.
- Support Telescope navigation, netrw for file browsing/preview, Oil.nvim for file operations, LSP, Treesitter, Copilot, and sane UX defaults. - Support Telescope navigation, netrw for tree browsing, previews, and file operations, LSP, Treesitter, Copilot, and sane UX defaults.
- Native project-local configuration via `exrc` + `secure` (no external config plugins). - Native project-local configuration via `exrc` + `secure` (no external config plugins).
## Do Not Reintroduce ## Do Not Reintroduce
@ -40,7 +40,6 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
├── cmp.lua ├── cmp.lua
├── lsp.lua ├── lsp.lua
├── copilot.lua ├── copilot.lua
├── oil.lua
├── ufo.lua ├── ufo.lua
├── gitsigns.lua ├── gitsigns.lua
├── conform.lua ├── conform.lua
@ -82,7 +81,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
## Required Plugin Categories ## Required Plugin Categories
- Core: `nvim-lspconfig`, `nvim-cmp`, `cmp-nvim-lsp`, `cmp-buffer`, `cmp-path`, `LuaSnip`. - Core: `nvim-lspconfig`, `nvim-cmp`, `cmp-nvim-lsp`, `cmp-buffer`, `cmp-path`, `LuaSnip`.
- Navigation: `telescope.nvim` + `telescope-fzf-native.nvim`, `oil.nvim`. - Navigation: `telescope.nvim` + `telescope-fzf-native.nvim`; netrw is the sole file explorer.
- Treesitter: `nvim-treesitter`, `nvim-treesitter-textobjects`, `nvim-ts-autotag`. - Treesitter: `nvim-treesitter`, `nvim-treesitter-textobjects`, `nvim-ts-autotag`.
- UX/Editing: `Comment.nvim`, `nvim-surround`, `nvim-autopairs`, `indent-blankline.nvim`, `nvim-ufo`, `undotree`. - UX/Editing: `Comment.nvim`, `nvim-surround`, `nvim-autopairs`, `indent-blankline.nvim`, `nvim-ufo`, `undotree`.
- Git: `gitsigns.nvim`. - Git: `gitsigns.nvim`.
@ -93,7 +92,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
## Workflow Requirements to Preserve ## Workflow Requirements to Preserve
- Netrw for visual context and project structure browsing (tree view, preview splits). - Netrw for visual context and project structure browsing (tree view, preview splits).
- Telescope for fuzzy finding (files, grep, buffers, LSP symbols). - Telescope for fuzzy finding (files, grep, buffers, LSP symbols).
- Oil.nvim for file manipulation (handles buffer sync on rename/move/delete). - Netrw for file manipulation as well as browsing, preserving the same workflow on remote systems.
- LSP for navigation (gd, gr, K, etc.). - LSP for navigation (gd, gr, K, etc.).
- Heavy HTML/PHP/JS/Markdown usage (WordPress plugin dev) — prioritize these languages in LSP/Treesitter. - Heavy HTML/PHP/JS/Markdown usage (WordPress plugin dev) — prioritize these languages in LSP/Treesitter.
- Format-on-save with toggle capability. - Format-on-save with toggle capability.
@ -110,7 +109,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
## Current Status (Phase 12 In Progress) ## Current Status (Phase 12 In Progress)
- ✅ Phase 1-2: Archive legacy, bootstrap lazy.nvim - ✅ Phase 1-2: Archive legacy, bootstrap lazy.nvim
- ✅ Phase 3: Core editing & LSP (native exrc + vim.lsp.config migration complete) - ✅ Phase 3: Core editing & LSP (native exrc + vim.lsp.config migration complete)
- ✅ Phase 4: Navigation (Telescope, netrw, Oil.nvim) - ✅ Phase 4: Navigation (Telescope and netrw)
- ✅ Phase 5: Treesitter (parsers, textobjects, autotag) - ✅ Phase 5: Treesitter (parsers, textobjects, autotag)
- ✅ Phase 6: UX/Editing (Comment, surround, autopairs, indent guides, UFO, undotree) - ✅ Phase 6: UX/Editing (Comment, surround, autopairs, indent guides, UFO, undotree)
- ✅ Phase 7: Git integration (Gitsigns) - ✅ Phase 7: Git integration (Gitsigns)
@ -119,6 +118,8 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
- ✅ Phase 10: Migrate kept behaviors (abbreviations, templates, custom Treesitter queries) - ✅ Phase 10: Migrate kept behaviors (abbreviations, templates, custom Treesitter queries)
- ✅ Phase 11: Modern Paper Tonic colorscheme - ✅ Phase 11: Modern Paper Tonic colorscheme
- ⏳ Phase 12: Cleanup and validation (repository cleanup and automated checks complete; interactive workflow checks remain) - ⏳ Phase 12: Cleanup and validation (repository cleanup and automated checks complete; interactive workflow checks remain)
- 📋 Phase 13: Controlled Neovim 0.12.6 upgrade (planned)
- 📋 Phase 14: Netrw live previews and directory summaries (planned after upgrade)
## Migration Notes ## Migration Notes
- Do not edit legacy Vimscript files except to extract settings to Lua. Keep them intact until migration completes. - Do not edit legacy Vimscript files except to extract settings to Lua. Keep them intact until migration completes.
@ -129,7 +130,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
## Validation ## Validation
- Ensure Neovim starts without errors and with minimal startup time. - Ensure Neovim starts without errors and with minimal startup time.
- Verify Telescope navigation, netrw browsing, Oil.nvim file operations, LSP basics, and completion. - Verify Telescope navigation, netrw browsing and file operations, LSP basics, and completion.
- Keep plugin count tight; remove anything unused. - Keep plugin count tight; remove anything unused.
## Key Decisions & Architecture ## Key Decisions & Architecture
@ -145,12 +146,12 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
### Navigation Strategy ### Navigation Strategy
- **netrw**: Visual context, tree view, preview splits (horizontal 50/50 below) - **netrw**: Visual context, tree view, preview splits (horizontal 50/50 below)
- **Telescope**: Fuzzy finding (files, grep, buffers, LSP symbols) - **Telescope**: Fuzzy finding (files, grep, buffers, LSP symbols)
- **Oil.nvim**: File manipulation (handles buffer sync on rename/move/delete) - **netrw**: Sole file explorer for tree browsing, previews, and file operations
- **PHP gf enhancement**: Custom `includeexpr` in `after/ftplugin/php.lua` for WordPress/PHP patterns - **PHP gf enhancement**: Custom `includeexpr` in `after/ftplugin/php.lua` for WordPress/PHP patterns
### Formatting & Linting ### Formatting & Linting
- **Formatters**: prettier, phpcbf, stylua, black (project-local → Mason → global) - **Formatters**: prettier, phpcbf, stylua, ruff_format (project-local → Mason → global)
- **Linters**: eslint_d, phpcs, markdownlint, ruff (via nvim-lint) - **Linters**: eslint_d, phpcs, markdownlint, plus Ruff through LSP
- **Format-on-save**: Enabled by default, toggle with `<leader>lt` - **Format-on-save**: Enabled by default, toggle with `<leader>lt`
- **Philosophy**: Formatters are source of truth; Neovim settings match formatter rules per filetype - **Philosophy**: Formatters are source of truth; Neovim settings match formatter rules per filetype

3
LOG.md
View file

@ -186,6 +186,9 @@ Record every decision here with a short rationale. Append new entries; do not re
- 2026-10-27: Updated `AGENTS.md` status and LSP architecture notes to reflect completed colorscheme work and the current Phase 12 implementation. - 2026-10-27: Updated `AGENTS.md` status and LSP architecture notes to reflect completed colorscheme work and the current Phase 12 implementation.
- 2026-10-27: Added Conform's built-in `ruff_format` for Python. Ruff was already Mason-managed for diagnostics; this closes a gap where documentation claimed Python formatting but format-on-save had no Python formatter and disabled LSP fallback. - 2026-10-27: Added Conform's built-in `ruff_format` for Python. Ruff was already Mason-managed for diagnostics; this closes a gap where documentation claimed Python formatting but format-on-save had no Python formatter and disabled LSP fallback.
- 2026-10-27: Fixed `<C-6>` in netrw when no previous real-file buffer has been recorded. Buffer classification now rejects `nil`, non-numeric, and non-positive buffer identifiers before calling Neovim's buffer API, allowing the mapping to fall back safely. - 2026-10-27: Fixed `<C-6>` in netrw when no previous real-file buffer has been recorded. Buffer classification now rejects `nil`, non-numeric, and non-positive buffer identifiers before calling Neovim's buffer API, allowing the mapping to fall back safely.
- 2026-10-27: Removed Oil.nvim after workflow evaluation. Netrw is now the sole tree browser and file explorer, preserving the same navigation model on remote systems; Telescope remains dedicated to fuzzy finding. Removed Oil's plugin spec, lockfile entry, keymaps, colorscheme groups, and active documentation.
- 2026-10-27: Planned the next work in two ordered phases. Phase 13 upgrades the standalone Neovim installation from 0.11.5 to stable 0.12.6 using versioned installations, isolated plugin testing, an unchanged initial lockfile, and an immediate rollback path; plugin updates follow only after core compatibility, and Mason tools remain a later step. Phase 14 then adds netrw-only live previews and read-only directory summaries against the validated 0.12 runtime.
- 2026-10-27: Recorded the pre-upgrade rollback baseline: Neovim 0.11.5, 28 active lazy.nvim plugin specs after Oil removal, 32 compiled Treesitter parser binaries, clean headless startup, all active Lua files parsing, and `git diff --check` passing. The standalone 0.11.5 installation remains untouched under `/opt/neovim/nvim-linux-x86_64`.
## Project-Local Configuration ## Project-Local Configuration

View file

@ -114,8 +114,7 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- [x] Decision: Skip Neo-tree in favor of netrw for navigation/visual context - [x] Decision: Skip Neo-tree in favor of netrw for navigation/visual context
- [x] Decision: Use netrw for project structure visualization and file preview - [x] Decision: Use netrw for project structure visualization and file preview
- [x] Decision: Telescope as primary "find file" tool - [x] Decision: Telescope as primary "find file" tool
- [x] Decision: Add Oil.nvim for file manipulation (handles buffer sync on rename/move/delete) - [x] Decision: Evaluate Oil.nvim for file manipulation (later removed in Phase 4.5)
- [x] Note: Oil.nvim is for evaluation; alternative is mini.files if too heavy
## Phase 4.2 — Configure netrw ## Phase 4.2 — Configure netrw
- [x] Configure netrw with tree view, preview split, and basic settings (no banner, sensible defaults) - [x] Configure netrw with tree view, preview split, and basic settings (no banner, sensible defaults)
@ -144,7 +143,7 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- `<leader>fS` - Workspace symbols (LSP) - `<leader>fS` - Workspace symbols (LSP)
- [x] Minimal UI: dropdown theme for files/buffers, no previewer for quick selection - [x] Minimal UI: dropdown theme for files/buffers, no previewer for quick selection
## Phase 4.4 — Oil.nvim for file manipulation ## Phase 4.4 — Oil.nvim evaluation (retired)
- [x] Add `stevearc/oil.nvim` for filesystem operations (rename, create, delete, copy, move) - [x] Add `stevearc/oil.nvim` for filesystem operations (rename, create, delete, copy, move)
- [x] Configure to handle buffer name sync on file operations - [x] Configure to handle buffer name sync on file operations
- [x] Keep minimal - use only when shell operations would cause buffer issues - [x] Keep minimal - use only when shell operations would cause buffer issues
@ -156,6 +155,11 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- [x] Floating window preview direction: `preview_split = "right"` - [x] Floating window preview direction: `preview_split = "right"`
- [x] Note: Evaluate practicality; can switch to `mini.files` if preferred - [x] Note: Evaluate practicality; can switch to `mini.files` if preferred
## Phase 4.5 — Return to a netrw-only explorer workflow
- [x] Remove Oil.nvim after workflow evaluation
- [x] Use netrw as the sole tree browser and file explorer for consistency on remote systems
- [x] Keep Telescope as a fuzzy finder rather than a file explorer
## Phase 5 — Treesitter ## Phase 5 — Treesitter
## Phase 5.1 — Confirm scope and priorities ## Phase 5.1 — Confirm scope and priorities
@ -427,7 +431,6 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- [x] Add Telescope highlights (TelescopeNormal, TelescopeBorder, TelescopeSelection) - [x] Add Telescope highlights (TelescopeNormal, TelescopeBorder, TelescopeSelection)
- [x] Add Gitsigns highlights (GitSignsAdd, GitSignsChange, GitSignsDelete) - [x] Add Gitsigns highlights (GitSignsAdd, GitSignsChange, GitSignsDelete)
- [x] Add nvim-cmp highlights (CmpItemKind*, CmpItemMenu, etc.) - [x] Add nvim-cmp highlights (CmpItemKind*, CmpItemMenu, etc.)
- [x] Add Oil.nvim highlights if needed
**Notes**: **Notes**:
- LSP diagnostics use red (error), orange (warn), blue (info), green (hint) - LSP diagnostics use red (error), orange (warn), blue (info), green (hint)
@ -436,7 +439,6 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- Telescope uses neutral colors with primary accent for matching and selection - Telescope uses neutral colors with primary accent for matching and selection
- Gitsigns uses status colors: green (add), blue (change), red (delete) - Gitsigns uses status colors: green (add), blue (change), red (delete)
- nvim-cmp uses primary tones for kinds, bold for matching text - nvim-cmp uses primary tones for kinds, bold for matching text
- Oil.nvim uses bold for directories, status colors for permissions and operations
- indent-blankline and ufo use subtle grays for non-intrusive UI - indent-blankline and ufo use subtle grays for non-intrusive UI
## Phase 11.9 — Update plugin configuration ## Phase 11.9 — Update plugin configuration
@ -481,7 +483,7 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
## Phase 12.4 — Navigation validation ## Phase 12.4 — Navigation validation
- [ ] Validate Telescope navigation + LSP jumps - [ ] Validate Telescope navigation + LSP jumps
- [ ] Validate netrw browsing and preview splits - [ ] Validate netrw browsing and preview splits
- [ ] Validate Oil.nvim file operations - [x] Remove Oil.nvim and its keymaps, lockfile entry, highlights, and active documentation
- [x] Fix working directory behavior (disabled autochdir, locked Telescope to project root) - [x] Fix working directory behavior (disabled autochdir, locked Telescope to project root)
- [x] Make alternate-buffer jumps skip netrw explorer buffers when returning to the last real file - [x] Make alternate-buffer jumps skip netrw explorer buffers when returning to the last real file
- [x] Guard alternate-buffer tracking against unset or invalid buffer numbers - [x] Guard alternate-buffer tracking against unset or invalid buffer numbers
@ -500,6 +502,166 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- [x] Update LOG.md with final architecture and usage - [x] Update LOG.md with final architecture and usage
- [ ] Clean up any remaining debug code or temporary comments - [ ] Clean up any remaining debug code or temporary comments
## Phase 13 — Controlled Neovim 0.12 Upgrade
## Phase 13.1 — Confirm scope and upgrade policy
- [ ] Confirm scope and priorities for this phase
- [x] Target the current stable release: Neovim 0.12.6
- [x] Continue using the official standalone Linux archive; do not hand Neovim management to pacman
- [x] Keep Neovim 0.11.5 available until the upgraded setup has passed normal-use validation
- [x] Separate the Neovim upgrade, plugin update, and Mason tool update into independently testable steps
## Phase 13.2 — Create a clean rollback checkpoint
- [x] Commit the completed Oil.nvim removal before beginning the upgrade
- [x] Record the current Neovim version, plugin lockfile, parser state, and startup result
- [x] Confirm the existing 0.11.5 configuration still passes its automated checks
- [x] Do not remove or overwrite the working 0.11.5 installation
## Phase 13.3 — Audit 0.12 compatibility before switching
- [ ] Review the Neovim 0.12 breaking changes against the active configuration
- [ ] Replace deprecated `vim.loop` usage with `vim.uv`
- [ ] Replace deprecated diagnostic navigation APIs with the current diagnostic jump API
- [ ] Revalidate native `exrc` behavior now that 0.12 searches parent directories
- [ ] Verify `vim.secure.read()` behavior in the project-local LSP settings loader
- [ ] Determine how Neovim 0.12's built-in directory buffers interact with opt-in legacy netrw
- [ ] Explicitly load netrw with `:packadd netrw` from Lua if 0.12 no longer loads it automatically
- [ ] Check for conflicts or redundancy with Neovim 0.12's built-in `:Undotree`; do not remove the plugin without a separate decision
## Phase 13.4 — Install Neovim 0.12.6 alongside 0.11.5
- [ ] Download the official `nvim-linux-x86_64.tar.gz` release archive
- [ ] Verify the archive against the SHA-256 digest published with the release
- [ ] Install into a versioned directory without replacing 0.11.5
- [ ] Introduce an explicit `current` symlink (or equivalent atomic selector) for the active version
- [ ] Update the external PATH configuration only after both versioned binaries are verified
- [ ] Document the one-command rollback to 0.11.5
Proposed layout:
```text
/opt/neovim/nvim-0.11.5/
/opt/neovim/nvim-0.12.6/
/opt/neovim/current -> nvim-0.11.5
```
## Phase 13.5 — Test 0.12 with the existing plugin lockfile
- [ ] Use isolated `XDG_DATA_HOME`, `XDG_CACHE_HOME`, and `XDG_STATE_HOME` directories
- [ ] Install the currently locked plugin revisions into the isolated data directory
- [ ] Keep the production plugin and Mason directories untouched
- [ ] Validate headless startup and capture startup time
- [ ] Run `:checkhealth` and review every relevant warning/error
- [ ] Verify netrw can be loaded and `:Explore` opens the expected tree browser
- [ ] Fix core/config compatibility issues before updating plugins
## Phase 13.6 — Update plugins in isolation
- [ ] Use a temporary branch or worktree based on the rollback checkpoint
- [ ] Run lazy.nvim updates only inside the isolated 0.12 test environment
- [ ] Review every lockfile change before adopting it
- [ ] Prioritize lazy.nvim, nvim-lspconfig, Treesitter, Telescope, Mason integration, completion, formatting, linting, UFO, and Copilot compatibility
- [ ] Rebuild or update Treesitter parsers for the 0.12 runtime and verify custom queries
- [ ] Keep Mason-managed language servers, formatters, and linters pinned during this step
- [ ] Adopt the tested lockfile only after all plugin-level regressions are resolved
## Phase 13.7 — Validate the complete 0.12 candidate
- [ ] Validate startup, lazy loading, commands, and keymaps
- [ ] Validate netrw tree browsing, previews, alternate-buffer behavior, and file operations
- [ ] Validate Telescope files, grep, buffers, and LSP symbol pickers
- [ ] Validate LSP attachment, `gd`, `gr`, `K`, diagnostics, and project-local `.nvim.lua` settings
- [ ] Validate nvim-cmp, LuaSnip, and Copilot completion
- [ ] Validate conform format-on-save and nvim-lint/Ruff diagnostics
- [ ] Validate Treesitter highlighting, text objects, autotag, folding, and custom HTML/CSS queries
- [ ] Validate the Paper Tonic colorscheme, plugin highlights, sessions, persistent undo, and shell templates
- [ ] Perform interactive smoke tests in the PHP validation workspace
## Phase 13.8 — Activate with rollback available
- [ ] Switch the active-version selector from 0.11.5 to 0.12.6
- [ ] Repeat a short smoke test through the normal shell/PATH entrypoint
- [ ] Keep 0.11.5 and its rollback instructions available during a settling period
- [ ] Update AGENTS.md, README.md, and LOG.md with the final supported version and upgrade procedure
- [ ] Remove 0.11.5 only after an explicit later decision
## Phase 13.9 — Update external tools separately
- [ ] Review Mason package updates only after Neovim and plugin revisions are stable
- [ ] Update language servers, formatters, and linters in small groups
- [ ] Revalidate PHP, JavaScript/TypeScript, HTML/CSS, Markdown, Lua, and Python after each group
## Phase 14 — Netrw Live Preview and Directory Summaries
## Phase 14.1 — Confirm the final interaction model
- [ ] Confirm scope and priorities for this phase after the 0.12 upgrade
- [x] Keep netrw as the sole tree browser and file explorer
- [x] Keep `p` as the preview entry point so stock-netrw muscle memory remains useful on remote systems
- [x] Once a native preview window exists, update it automatically as the netrw cursor moves
- [x] Close the preview automatically when a file is opened for editing or netrw is left
- [x] Treat the existence of the preview window as state; avoid a separate global preview-mode flag
Target workflow:
```text
p on file/directory open preview and begin live updates
j / k replace preview with the selected entry
<CR>, o, v, t open the file and close the preview
:pclose / <C-w>z close the preview and stop live updates
```
## Phase 14.2 — Revalidate netrw integration on Neovim 0.12
- [ ] Confirm the netrw version and its documented `netrw#Call()` bridge
- [ ] Confirm `NetrwGetWord`, `NetrwBrowseChgDir`, and `NetrwPreview` remain available
- [ ] Confirm tree paths, symlinks, directory markers, local paths, and URI paths are classified correctly
- [ ] Resolve any interaction with Neovim 0.12's built-in `filetype=directory` buffers
- [ ] Keep a graceful stock-netrw fallback if enhanced preview setup cannot be installed
## Phase 14.3 — Implement live preview lifecycle
- [ ] Extend netrw's buffer-local `p` behavior without changing its familiar purpose
- [ ] Add a narrowly scoped, buffer-local `CursorMoved` autocmd
- [ ] Debounce preview updates by approximately 75–100 ms
- [ ] Update only when a preview window exists in the current tab
- [ ] Continue using netrw's native preview machinery for regular files
- [ ] Close the preview when leaving the netrw buffer to edit a file
- [ ] Cancel and close pending timers when the netrw buffer is wiped out
- [ ] Avoid focus changes: keep the cursor in the tree while previews update
## Phase 14.4 — Add read-only directory summaries
- [ ] Show an informational scratch-buffer preview when the selected entry is a directory
- [ ] List immediate children only; do not calculate recursive directory sizes
- [ ] Sort directories first and files second, alphabetically within each group
- [ ] Show entry type, human-readable file size, modification time, and name
- [ ] Show a summary count and total size for immediate files
- [ ] Cap output at approximately 200 entries and show a truncation notice
- [ ] Handle empty, missing, unreadable, and rapidly changing directories without errors
- [ ] Display symlinks distinctly without recursively following directory links
- [ ] Mirror netrw's hidden-file visibility where practical
- [ ] Support local filesystems when Neovim itself is running over SSH
- [ ] Fall back to native behavior for remote netrw URI schemes if directory enumeration is unavailable
Example directory preview:
```text
lua/plugins/
Type Size Modified Name
dir — 2026-10-27 11:42 helpers/
file 4.8K 2026-10-27 13:10 lsp.lua
file 3.2K 2026-10-27 12:55 telescope.lua
1 directory, 2 files, 8.0K
```
## Phase 14.5 — Test preview behavior
- [ ] Test file → file, file → directory, directory → file, and directory → directory movement
- [ ] Test directory expand/collapse while a preview exists
- [ ] Test manual preview closure and confirm cursor movement no longer previews
- [ ] Test `<CR>`, horizontal split, vertical split, and tab selection cleanup
- [ ] Test separate preview windows across tabpages
- [ ] Test spaces, Unicode, symlinks, unreadable entries, deleted entries, and large directories
- [ ] Test rapid cursor movement for flicker, stale timers, and excess filesystem work
- [ ] Test the workflow in an actual SSH session
- [ ] Confirm stock netrw remains understandable when this configuration is unavailable
## Phase 14.6 — Document and finalize
- [ ] Update README.md and `:KeymapsGuide` with the enhanced `p` lifecycle
- [ ] Record implementation decisions and limitations in LOG.md
- [ ] Mark Phase 12.4 netrw preview validation complete after interactive use
--- ---
Notes: Notes:
@ -518,4 +680,4 @@ Decisions & Changes:
- **Project config format**: `.nvim.lua` files return `{ lsp = { [server_name] = { settings = {...} } } }`. - **Project config format**: `.nvim.lua` files return `{ lsp = { [server_name] = { settings = {...} } } }`.
- **Security model**: `secure` mode prompts user to trust `.nvim.lua` files before execution (one-time per file hash). - **Security model**: `secure` mode prompts user to trust `.nvim.lua` files before execution (one-time per file hash).
- **Settings loading**: An `LspAttach` callback securely reads project settings from the client's actual `root_dir` (not cwd), ensuring correct behavior across different workspace structures. - **Settings loading**: An `LspAttach` callback securely reads project settings from the client's actual `root_dir` (not cwd), ensuring correct behavior across different workspace structures.
- **Phase 4 Navigation Strategy**: Skipped Neo-tree in favor of built-in netrw for visual context and project structure browsing. Telescope for fuzzy finding. Oil.nvim for file manipulation (evaluation phase; alternative is mini.files). Rationale: User needs visual context and preview, not per-tab roots or complex tree features. File manipulation primarily done in shell, but Oil.nvim handles buffer sync issues when renaming/moving files. - **Phase 4 Navigation Strategy**: Use built-in netrw as the sole tree browser and file explorer so the workflow transfers to remote systems. Telescope remains the fuzzy finder. Oil.nvim was evaluated and removed because maintaining a second explorer split muscle memory without providing the preferred tree view.

View file

@ -226,38 +226,6 @@ Buffer-local keymaps available when inside a git repository:
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `buffers` picker | i | `<C-d>` | Delete highlighted buffer | | `buffers` picker | i | `<C-d>` | Delete highlighted buffer |
### Oil `lua/plugins/oil.lua`
#### Keymaps
##### Global launcher mappings
| Mode | Key | Description |
| --- | --- | --- |
| n | `<leader>fo` | Open Oil in current window |
| n | `<leader>fO` | Open Oil in floating window |
##### Oil buffer mappings (`opts.keymaps`)
| Key | Description |
| --- | --- |
| `g?` | Show Oil help |
| `<CR>` | Open entry in current window |
| `<C-s>` | Open entry in vertical split |
| `<C-h>` | Open entry in horizontal split |
| `<C-t>` | Open entry in new tab |
| `<C-p>` | Preview entry (vertical split belowright) |
| `<C-c>` | Close Oil |
| `<C-l>` | Refresh |
| `-` | Go to parent directory |
| `_` | Open Neovim cwd |
| `` ` `` | `:cd` into entry |
| `~` | `:tcd` into entry |
| `gs` | Change sort mode |
| `gx` | Open entry externally |
| `g.` | Toggle hidden files |
| `g\` | Toggle trash visibility |
### UFO (Folding) `lua/plugins/ufo.lua` ### UFO (Folding) `lua/plugins/ufo.lua`
#### Keymaps #### Keymaps

View file

@ -22,7 +22,6 @@
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
"oil.nvim": { "branch": "master", "commit": "d278dc40f9de9980868a0a55fa666fba5e6aeacb" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },

View file

@ -1,5 +1,5 @@
-- Paper Tonic Modern - Plugin Highlight Groups -- Paper Tonic Modern - Plugin Highlight Groups
-- Highlights for various plugins (Telescope, Gitsigns, cmp, Oil, etc.) -- Highlights for configured plugins (Telescope, Gitsigns, cmp, etc.)
local c = require('paper-tonic-modern.colors') local c = require('paper-tonic-modern.colors')
@ -96,31 +96,6 @@ return {
CmpItemKindOperator = { fg = c.fg }, CmpItemKindOperator = { fg = c.fg },
CmpItemKindTypeParameter = { fg = c.primary }, CmpItemKindTypeParameter = { fg = c.primary },
-- ============================================================================
-- Oil.nvim (file explorer)
-- ============================================================================
OilDir = { fg = c.fg_strong, bold = true },
OilDirIcon = { fg = c.fg_strong },
OilLink = { fg = c.modified },
OilLinkTarget = { fg = c.fg_weak },
OilFile = { fg = c.fg },
OilFileIcon = { fg = c.fg },
OilSize = { fg = c.fg_weak },
OilPermissionNone = { fg = c.fg_weaker },
OilPermissionRead = { fg = c.success },
OilPermissionWrite = { fg = c.diag_warn },
OilPermissionExecute = { fg = c.modified },
OilCopy = { fg = c.success, bold = true },
OilMove = { fg = c.modified, bold = true },
OilCreate = { fg = c.success, bold = true },
OilDelete = { fg = c.fail, bold = true },
OilChange = { fg = c.modified, bold = true },
OilRestore = { fg = c.success },
OilPurge = { fg = c.diag_error, bold = true },
OilTrash = { fg = c.fail },
OilTrashSourcePath = { fg = c.fg_weak, italic = true },
-- ============================================================================ -- ============================================================================
-- Comment.nvim -- Comment.nvim
-- ============================================================================ -- ============================================================================

View file

@ -1,120 +0,0 @@
-- Oil.nvim: file manipulation with buffer sync
-- Handles rename/move/delete operations that would break buffer names
-- Use when shell operations would cause buffer issues
return {
'stevearc/oil.nvim',
-- set lazy loading
lazy = true,
keys = {
{ '<leader>fo', '<cmd>Oil<cr>', desc = 'Oil: Open file browser' },
{ '<leader>fO', '<cmd>Oil --float<cr>', desc = 'Oil: Open in floating window' },
},
opts = {
-- Don't hijack netrw - allow both to coexist
default_file_explorer = false,
-- Columns shown in the oil buffer
columns = {
'icon',
-- 'permissions',
-- 'size',
-- 'mtime',
},
-- Buffer-local options to use for oil buffers
buf_options = {
buflisted = false,
bufhidden = 'hide',
},
-- Window-local options to use for oil buffers
win_options = {
wrap = false,
signcolumn = 'no',
cursorcolumn = false,
foldcolumn = '0',
spell = false,
list = false,
conceallevel = 3,
concealcursor = 'nvic',
number = true,
relativenumber = true,
},
-- Delete to trash instead of permanently deleting
delete_to_trash = false,
-- Skip confirmation for simple operations
skip_confirm_for_simple_edits = false,
-- Prompt before deleting a directory
prompt_save_on_select_new_entry = true,
-- Use default keymaps (see :help oil-actions)
use_default_keymaps = true,
-- Set to false to disable all of the above keymaps
keymaps = {
['g?'] = 'actions.show_help',
['<CR>'] = 'actions.select',
['<C-s>'] = 'actions.select_vsplit',
['<C-h>'] = 'actions.select_split',
['<C-t>'] = 'actions.select_tab',
-- Preview opens to the right via vertical split
['<C-p>'] = {
'actions.preview',
opts = { vertical = true, split = 'belowright' },
},
['<C-c>'] = 'actions.close',
['<C-l>'] = 'actions.refresh',
['-'] = 'actions.parent',
['_'] = 'actions.open_cwd',
['`'] = 'actions.cd',
['~'] = 'actions.tcd',
['gs'] = 'actions.change_sort',
['gx'] = 'actions.open_external',
['g.'] = 'actions.toggle_hidden',
['g\\'] = 'actions.toggle_trash',
},
-- Configuration for the floating window in oil.open_float
float = {
-- Padding around the floating window
padding = 2,
max_width = 0,
max_height = 0,
border = 'rounded',
win_options = {
winblend = 0,
},
-- Preview split direction for floating Oil windows
preview_split = "right",
},
-- Configuration for the actions floating preview window
preview = {
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
max_width = 0.9,
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
min_width = { 40, 0.4 },
-- optionally define an integer/float for the exact width of the preview window
width = nil,
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
max_height = 0.9,
min_height = { 5, 0.1 },
height = nil,
border = 'rounded',
win_options = {
winblend = 0,
},
},
-- Preview split direction: "auto" (floating), "left", "right", "above", "below"
-- This setting is deprecated; use keymap opts or float.preview_split instead
-- preview_split = "right",
-- Configuration for the floating progress window
progress = {
max_width = 0.9,
min_width = { 40, 0.4 },
width = nil,
max_height = { 10, 0.9 },
min_height = { 5, 0.1 },
height = nil,
border = 'rounded',
minimized_border = 'none',
win_options = {
winblend = 0,
},
},
},
}