migrate from lazy.nvim to vim.pack (neovim 0.12)#12
Open
body-clock wants to merge 13 commits intomainfrom
Open
migrate from lazy.nvim to vim.pack (neovim 0.12)#12body-clock wants to merge 13 commits intomainfrom
body-clock wants to merge 13 commits intomainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vim.pack, neovim 0.12's built-in package managerlua/config/pack.luareplaceslua/config/lazy.lua— callsvim.pack.add()with all plugins (full GitHub URLs,load=true), thenrequire()s each plugin config in dependency orderlua/config/plugins/*.luafiles rewritten from lazy.nvim spec tables into plain setup modules — noreturn {}wrapper, noevent/keys/cmd/build/dependenciesfields; keymaps defined inlineversion = "main"for the 1.0 rewrite;require("nvim-treesitter.configs").setup()replaced withrequire("nvim-treesitter").setup(), bundled parsers removed fromensure_installedruntimepath:prependsince vim.pack only manages Git pluginsThings to verify on first boot
:checkhealth— expect vim.pack to install all plugins on first launchversion = "main"will force a fresh clone):lua =vim.pack.get()lists all expected plugins:TSInstall ruby yamlif auto_install doesn't fire)Notes
lazy-lock.jsonis superseded bynvim-pack-lock.json(generated on first run — commit it)vimundefined-global LSP warnings will resolve once lazydev is installed and loadeddeno task build:fastafter install (no build hook in vim.pack)🤖 Generated with Claude Code