clean up legacy files
This commit is contained in:
parent
638ff2812f
commit
bc35923fe2
658 changed files with 196 additions and 1 deletions
99
AGENTS.md
Normal file
99
AGENTS.md
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# AGENTS: Neovim Config Migration
|
||||
|
||||
Scope: applies to the entire `~/.config/nvim` directory tree.
|
||||
|
||||
This repository is being migrated to a modern, minimal Neovim setup driven by Lua and lazy.nvim. Follow these rules when making changes.
|
||||
|
||||
## Goals
|
||||
- Modern Lua-first config; avoid Vimscript unless explicitly requested.
|
||||
- Keep it minimal, fast, and maintainable.
|
||||
- Base plugin management on `lazy.nvim` with modular plugin specs.
|
||||
- Support tab-per-context workflow with Neo-tree per tab, Telescope navigation, LSP, Treesitter, Copilot, and sane UX defaults.
|
||||
|
||||
## Do Not Reintroduce
|
||||
- Custom Vimscript tabline/statusline, foldtext, UI hacks.
|
||||
- Legacy autocommands toggling cursorline/column per window.
|
||||
- CoC or CoC-specific config.
|
||||
- netrw settings (Neo-tree will be used).
|
||||
- Providers for ruby/perl/node (disable unless required by a plugin).
|
||||
- Auto-reload vimrc-on-write templates.
|
||||
- `cursorcolumn` and old folding logic not related to UFO.
|
||||
|
||||
## Repository Structure (target)
|
||||
```
|
||||
~/.config/nvim/
|
||||
├── init.lua -- entrypoint; bootstraps lazy.nvim and loads Lua modules
|
||||
└── lua/
|
||||
├── settings.lua -- non-plugin options
|
||||
├── keymaps.lua -- non-plugin keymaps
|
||||
├── autocmds.lua -- non-plugin autocommands
|
||||
├── utils.lua -- helpers (only if needed)
|
||||
└── plugins/ -- one file per plugin or domain
|
||||
├── neo-tree.lua
|
||||
├── telescope.lua
|
||||
├── treesitter.lua
|
||||
├── cmp.lua
|
||||
├── lsp.lua
|
||||
├── copilot.lua
|
||||
├── ufo.lua
|
||||
├── gitsigns.lua
|
||||
├── markdown.lua
|
||||
└── none-ls.lua
|
||||
```
|
||||
|
||||
## Coding Conventions
|
||||
- Use Lua APIs: `vim.opt`, `vim.api.nvim_create_autocmd`, `vim.keymap.set`.
|
||||
- No inline Vimscript or `vim.cmd` blocks unless strictly necessary.
|
||||
- Keep plugin configuration self-contained in its plugin spec file.
|
||||
- Prefer small, readable modules and minimal configuration over heavy customization.
|
||||
- Keymaps: use `vim.keymap.set` with `{ silent = true, noremap = true }` defaults unless otherwise required.
|
||||
- Autocommands: group via `vim.api.nvim_create_augroup` and create specific, narrowly scoped autocmds.
|
||||
- Avoid global state; return tables from modules and plugin specs.
|
||||
|
||||
## Plugin Management (lazy.nvim)
|
||||
- Each plugin lives in `lua/plugins/<name>.lua` and returns a spec table.
|
||||
- Use `opts = {}` for default options and `config = function(_, opts) ... end` for setup.
|
||||
- Only include plugins listed in the migration guide unless explicitly approved.
|
||||
|
||||
## Required Plugin Categories
|
||||
- Core: `nvim-lspconfig`, `nvim-cmp`, `cmp-nvim-lsp`, `cmp-buffer`, `cmp-path`, `LuaSnip`.
|
||||
- Navigation: `neo-tree.nvim`, `telescope.nvim` (+ optional `telescope-fzf-native.nvim`).
|
||||
- Treesitter: `nvim-treesitter`, `nvim-treesitter-textobjects`, `nvim-ts-autotag`.
|
||||
- UX/Editing: `Comment.nvim`, `surround.nvim`, `nvim-autopairs`, `indent-blankline.nvim`, `leap.nvim` or `flash.nvim`, `nvim-ufo`, `undotree` (optional).
|
||||
- Git: `gitsigns.nvim`.
|
||||
- Markdown: `render-markdown.nvim`.
|
||||
- Copilot: `copilot.lua`, `copilot-cmp`.
|
||||
- Formatting: `none-ls.nvim`.
|
||||
|
||||
## Workflow Requirements to Preserve
|
||||
- Tab-per-context: each tab has its own Neo-tree root.
|
||||
- Provide keymaps for: Neo-tree floating, Neo-tree sidebar toggle, and file preview. Previews should not pollute buffer list.
|
||||
- Keep splits inside tabs.
|
||||
- Use Telescope and LSP for navigation.
|
||||
- Heavy HTML/PHP/JS/Markdown usage (WordPress plugin dev) — prioritize these languages in LSP/Treesitter.
|
||||
|
||||
## Behaviours to Keep (modernized)
|
||||
- Abbreviations: `adn→and`, `waht→what`, `tehn→then`, `functin→function`, `positin→position`.
|
||||
- Templates: auto-populate `.sh` from template.
|
||||
- Whitespace highlighting (use modern alternatives, e.g., `listchars`, plugins if needed).
|
||||
- Persistent folds (prefer `nvim-ufo`).
|
||||
- Spell & text: `spelllang=en_gb`, custom `listchars`, `showbreak`.
|
||||
|
||||
## Migration Notes
|
||||
- Do not edit legacy Vimscript files except to extract settings to Lua. Keep them intact until migration completes.
|
||||
- Introduce `init.lua` and bootstrap `lazy.nvim` before adding plugins.
|
||||
- Disable unnecessary providers early: `vim.g.loaded_ruby_provider = 0`, etc.
|
||||
- Keep startup fast; avoid unnecessary autoloading or heavy defaults.
|
||||
- When cleaning, archive existing files into a `legacy/` folder within this config instead of deleting. Maintain a brief index if helpful.
|
||||
|
||||
## Validation
|
||||
- Ensure Neovim starts without errors and with minimal startup time.
|
||||
- Verify tab workflow, Neo-tree behaviour, Telescope, LSP basics, and completion.
|
||||
- Keep plugin count tight; remove anything unused.
|
||||
|
||||
## Process
|
||||
- Before large changes, update the task plan via the CLI `update_plan` tool.
|
||||
- Keep the live checklist in `MIGRATION_PLAN.md:1` up to date and in sync with changes.
|
||||
- At the start of each phase, confirm scope and priorities for that phase.
|
||||
- Keep PR-sized patches; avoid broad unrelated edits.
|
||||
- Document non-obvious choices in commit messages or short comments near the code that needs it.
|
||||
Loading…
Add table
Add a link
Reference in a new issue