Skip to content

migrate from lazy.nvim to vim.pack (neovim 0.12)#12

Open
body-clock wants to merge 13 commits intomainfrom
nvim-0.12-vim-pack
Open

migrate from lazy.nvim to vim.pack (neovim 0.12)#12
body-clock wants to merge 13 commits intomainfrom
nvim-0.12-vim-pack

Conversation

@body-clock
Copy link
Copy Markdown
Owner

Summary

  • Replaces lazy.nvim with vim.pack, neovim 0.12's built-in package manager
  • New lua/config/pack.lua replaces lua/config/lazy.lua — calls vim.pack.add() with all plugins (full GitHub URLs, load=true), then require()s each plugin config in dependency order
  • All lua/config/plugins/*.lua files rewritten from lazy.nvim spec tables into plain setup modules — no return {} wrapper, no event/keys/cmd/build/dependencies fields; keymaps defined inline
  • nvim-treesitter pinned to version = "main" for the 1.0 rewrite; require("nvim-treesitter.configs").setup() replaced with require("nvim-treesitter").setup(), bundled parsers removed from ensure_installed
  • completion loaded before lsp so blink.cmp capabilities are available on first LspAttach
  • view-component.nvim (local dev plugin) added via runtimepath:prepend since vim.pack only manages Git plugins

Things to verify on first boot

  • Run :checkhealth — expect vim.pack to install all plugins on first launch
  • Confirm nvim-treesitter reinstalls cleanly from main (version = "main" will force a fresh clone)
  • Check :lua =vim.pack.get() lists all expected plugins
  • Verify treesitter highlighting works for Ruby/YAML (may need :TSInstall ruby yaml if auto_install doesn't fire)
  • Confirm blink.cmp, LSP, and lazydev all work in a Lua file

Notes

  • lazy-lock.json is superseded by nvim-pack-lock.json (generated on first run — commit it)
  • The vim undefined-global LSP warnings will resolve once lazydev is installed and loaded
  • peek.nvim still needs a manual deno task build:fast after install (no build hook in vim.pack)

🤖 Generated with Claude Code

body-clock and others added 13 commits March 30, 2026 15:19
Replace lazy.nvim with vim.pack, neovim 0.12's built-in package manager.

- Add lua/config/pack.lua: calls vim.pack.add() with all plugins (full
  GitHub URLs, load=true for eager loading), then requires each plugin
  config in dependency order. Local view-component.nvim added via
  runtimepath prepend.
- Remove lua/config/lazy.lua and update init.lua accordingly.
- Rewrite all lua/config/plugins/*.lua from lazy.nvim spec tables into
  plain setup modules — no return {}, no lazy-specific fields (event,
  keys, cmd, build, dependencies, opts_extend). Keymaps moved inline.
- nvim-treesitter: pin to version="main" for the 1.0 rewrite; drop
  require("nvim-treesitter.configs").setup() in favour of the new
  require("nvim-treesitter").setup() API. Bundled parsers (c, lua, vim,
  vimdoc, query, markdown) removed from ensure_installed.
- completion: load before lsp so blink.cmp capabilities are available
  when LSP attaches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adopt the structure and conventions from https://github.com/nvim-mini/MiniMax/tree/main/configs/nvim-0.12
while retaining existing plugin choices (tinted-nvim, blink.cmp, gitsigns, lazygit, oil, etc.).

Structure changes:
- init.lua: minimal — installs mini.nvim, sets up _G.Config with now/later/now_if_args
  helpers from mini.misc.safely(), Config.new_autocmd, Config.on_packchanged
- plugin/ (auto-sourced, numbered): replaces lua/config/ explicit require chain
  - 10_options.lua: vim options + autocmds (TextYankPost, CmdWinEnter guard,
    eruby.yaml→yaml); adds winborder='single' and completeopt fuzzy/nosort (0.12)
  - 20_keymaps.lua: all non-LspAttach keymaps in one place
  - 30_mini.lua: mini modules with now() for early (icons, notify, statusline,
    sessions) and later() for the rest
  - 40_plugins.lua: all other plugins via vim.pack.add inside now/later/now_if_args
    callbacks; colorscheme=now, treesitter+LSP=now_if_args, everything else=later
- after/lsp/: replaces lsp/ — same return-table format, canonical 0.12 location
- lua/config/ and lsp/ directories removed entirely

Treesitter changes:
- require('nvim-treesitter.configs').setup() removed (configs module gone in 1.0)
- require('nvim-treesitter').install() + vim.treesitter.start() via FileType autocmd
- :TSUpdate wired via Config.on_packchanged instead of build hook

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Disable node/perl/python3 providers — none are used in this config,
  silences 4 healthcheck warnings
- Set LSP log level to OFF — default WARN was growing the log to 145MB+

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main branch doesn't ship the fuzzy matching binary; tagged releases do.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes blink.cmp and friendly-snippets entirely. mini.completion is
already available via mini.nvim and integrates cleanly with the
now/later startup pattern.

- 30_mini.lua: add mini.completion in now_if_args (runs before LSP so
  capabilities are registered in time); sets omnifunc per-buffer via
  LspAttach; uses MiniCompletion.get_lsp_capabilities() for LSP
- 40_plugins.lua: remove blink.cmp, friendly-snippets, and blink-
  specific lazydev source config from LSP block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Was inside now_if_args, so with no file open it deferred to later()
and the commands weren't immediately available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant