add skeleton file structure

This commit is contained in:
Ray Elliott 2025-12-06 19:56:33 +00:00
parent bc35923fe2
commit e112d0d61e
9 changed files with 76 additions and 10 deletions

View File

@ -94,6 +94,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
## 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.
-- After any config or plugin change, immediately update `MIGRATION_PLAN.md` (check off items, add notes, or adjust next steps).
- 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.

View File

@ -6,18 +6,19 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- [x] Create AGENTS.md with rules
## Phase 1 — Clean & Archive Legacy Config
- [ ] Confirm scope and priorities for this phase
- [ ] Inventory existing Vimscript, plugin files, and directories
- [ ] Create `legacy/` archive folder within this config
- [ ] Move legacy init files and plugin directories into `legacy/` (do not delete)
- [ ] Optionally add `legacy/README.md` noting what was archived
- [ ] Keep `undodir`, `spell`, `view`, `UltiSnips`, `templates` as-is for now (review later)
- [x] Confirm scope and priorities for this phase
- [x] Inventory existing Vimscript, plugin files, and directories
- [x] Create `legacy/` archive folder within this config
- [x] Move legacy init files and plugin directories into `legacy/` (do not delete)
- [x] Optionally add `legacy/README.md` noting what was archived
- [x] Keep `undodir`, `spell`, `view`, `UltiSnips`, `templates` as-is for now (review later)
## Phase 2 — Bootstrap
- [ ] Confirm scope and priorities for this phase
- [ ] Scaffold Lua config skeleton (`init.lua`, `lua/settings.lua`, `lua/keymaps.lua`, `lua/autocmds.lua`, `lua/utils.lua`, `lua/plugins/`)
- [ ] Bootstrap `lazy.nvim` plugin manager
- [ ] Disable unused providers (ruby, perl, node)
- [x] Confirm scope and priorities for this phase
- [x] Scaffold Lua config skeleton (`init.lua`, `lua/settings.lua`, `lua/keymaps.lua`, `lua/autocmds.lua`, `lua/utils.lua`, `lua/plugins/`)
- [x] Bootstrap `lazy.nvim` plugin manager
- [x] Disable unused providers (ruby, perl, node)
- [x] Ensure lazy boots without specs (add empty `lua/plugins/init.lua`)
## Phase 3 — Core Editing & LSP
- [ ] Confirm scope and priorities for this phase

26
init.lua Normal file
View File

@ -0,0 +1,26 @@
-- Leader keys early
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Load basic settings, keymaps, autocmds (kept minimal for now)
require('settings')
require('keymaps')
require('autocmds')
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git', 'clone', '--filter=blob:none', '--single-branch',
'https://github.com/folke/lazy.nvim.git', lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Setup plugin system (plugins will be added incrementally)
require('lazy').setup({
spec = {
{ import = 'plugins' },
},
})

7
lua/autocmds.lua Normal file
View File

@ -0,0 +1,7 @@
-- Non-plugin autocommands (minimal placeholder for bootstrap)
local aug = vim.api.nvim_create_augroup('UserDefaults', { clear = true })
-- Add specific autocmds in later phases
return {}

8
lua/keymaps.lua Normal file
View File

@ -0,0 +1,8 @@
-- Non-plugin keymaps (kept intentionally minimal for bootstrap)
local map = vim.keymap.set
local opts = { noremap = true, silent = true }
-- Add non-plugin keymaps during Phase 3 when porting settings
return {}

0
lua/plugins/.gitkeep Normal file
View File

4
lua/plugins/init.lua Normal file
View File

@ -0,0 +1,4 @@
-- Placeholder to let lazy.nvim import the `plugins` module before specs exist.
-- Individual plugin specs will be added as separate files in this directory.
return {}

9
lua/settings.lua Normal file
View File

@ -0,0 +1,9 @@
-- Minimal settings for bootstrap phase
-- Disable unused language providers early; enable later only if a plugin requires them
vim.g.loaded_ruby_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
-- Additional non-plugin options will be migrated in Phase 3

10
lua/utils.lua Normal file
View File

@ -0,0 +1,10 @@
local M = {}
function M.safe_require(name)
local ok, mod = pcall(require, name)
if ok then return mod end
return nil
end
return M