add skeleton file structure
This commit is contained in:
parent
bc35923fe2
commit
e112d0d61e
|
|
@ -94,6 +94,7 @@ This repository is being migrated to a modern, minimal Neovim setup driven by Lu
|
||||||
## Process
|
## Process
|
||||||
- Before large changes, update the task plan via the CLI `update_plan` tool.
|
- 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.
|
- 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.
|
- At the start of each phase, confirm scope and priorities for that phase.
|
||||||
- Keep PR-sized patches; avoid broad unrelated edits.
|
- Keep PR-sized patches; avoid broad unrelated edits.
|
||||||
- Document non-obvious choices in commit messages or short comments near the code that needs it.
|
- Document non-obvious choices in commit messages or short comments near the code that needs it.
|
||||||
|
|
|
||||||
|
|
@ -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
|
- [x] Create AGENTS.md with rules
|
||||||
|
|
||||||
## Phase 1 — Clean & Archive Legacy Config
|
## Phase 1 — Clean & Archive Legacy Config
|
||||||
- [ ] Confirm scope and priorities for this phase
|
- [x] Confirm scope and priorities for this phase
|
||||||
- [ ] Inventory existing Vimscript, plugin files, and directories
|
- [x] Inventory existing Vimscript, plugin files, and directories
|
||||||
- [ ] Create `legacy/` archive folder within this config
|
- [x] Create `legacy/` archive folder within this config
|
||||||
- [ ] Move legacy init files and plugin directories into `legacy/` (do not delete)
|
- [x] Move legacy init files and plugin directories into `legacy/` (do not delete)
|
||||||
- [ ] Optionally add `legacy/README.md` noting what was archived
|
- [x] Optionally add `legacy/README.md` noting what was archived
|
||||||
- [ ] Keep `undodir`, `spell`, `view`, `UltiSnips`, `templates` as-is for now (review later)
|
- [x] Keep `undodir`, `spell`, `view`, `UltiSnips`, `templates` as-is for now (review later)
|
||||||
|
|
||||||
## Phase 2 — Bootstrap
|
## Phase 2 — Bootstrap
|
||||||
- [ ] Confirm scope and priorities for this phase
|
- [x] 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/`)
|
- [x] 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
|
- [x] Bootstrap `lazy.nvim` plugin manager
|
||||||
- [ ] Disable unused providers (ruby, perl, node)
|
- [x] Disable unused providers (ruby, perl, node)
|
||||||
|
- [x] Ensure lazy boots without specs (add empty `lua/plugins/init.lua`)
|
||||||
|
|
||||||
## Phase 3 — Core Editing & LSP
|
## Phase 3 — Core Editing & LSP
|
||||||
- [ ] Confirm scope and priorities for this phase
|
- [ ] Confirm scope and priorities for this phase
|
||||||
|
|
|
||||||
|
|
@ -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' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
@ -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 {}
|
||||||
|
|
||||||
|
|
@ -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,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 {}
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
Loading…
Reference in New Issue