Migration to v3.0
Migrating User Configuration
-
Plugin Manager Change: With v3 we have moved away from Packer and to the new lazy.nvim. The options for lazy can be configured with the
lazyuser option. We have also removed all abstraction away from the plugin specifications. So the lazy.nvim docs can be referred to for the format of adding new plugins. You can also check the updated Customizing Plugins Documentation for defining new plugins as well as overriding core plugins.- Lazy also handles overriding options and setup functions automatically so we have removed all of the
plugins.Xuser options for overriding the setup tables for the core provided plugins. These can be set up, extended, and configured similar to any other plugin that you are adding. - Note: The default options for lazy sets
lazy = truefor each plugin. This means plugins should either be configured appropriately for lazy loading or uselazy = falseif you do not want a plugin to be lazy loaded - The
user/plugins/folder is added to the Lazy plugin specifications to be imported. This allows you to add lists of plugins to any files in theuser/plugins/folder and they will be used appropriately. This will allow you to organize your plugins in any way you would prefer.
- Lazy also handles overriding options and setup functions automatically so we have removed all of the
-
astronvim.file_pluginsandastronvim.git_pluginstables have been removed in favor of aUserautocmdmodel. Wherever you are usingastronvim.file_pluginsorastronvim.git_pluginsto lazy load your plugins, please switch to lazy loading on the user eventsUser AstroFileandUser AstroGitFile. More details for these can be found in the updated Customizing Plugins Documentation. -
A large restructuring of our internal utilities has taken place.
- Our
coremodule has been renamed toastronvimso anywhere you userequire("core...")will need to be replaced withrequire("astronvim...") - Most utility functions in the global
astronvimvariable have been separated into specific modules and can be accessed with require such as:require("astronvim.utils"). Commonly used changes are:astronvim.lspis nowrequire("astronvim.utils.lsp"),astronvim.statusis nowrequire("astronvim.utils.status"), and most of the various utilities are now just inrequire("astronvim.utils"). Please check out the updated API documentation here for specific details and finding specific functions: api.astronvim.com.
- Our
-
We have removed Bufferline and are now using Heirline and
astronvim.utils.status(previously was inastronvim.statusbut is now accessed withrequire("astronvim.utils.status")) for our own performant and custom tabline. -
:AstroReloadhas been removed. There are a couple reasons for this, it was never very reliable and hard to maintain and lazy.nvim strictly does not support hot reloading neovim configurations. -
The
require("astronvim.utils.status").component.macro_recordingstatus component has been removed. Please use the improvedrequire("astronvim.utils.status").component.cmd_infocomponent. -
lsp.server-settingshas been renamed tolsp.config. If you have the["server-settings"]table in youruser/init.luafile, just rename it toconfig. If you have the folderuser/lsp/server-settings, just rename the folder touser/lsp/config. -
luasnipoptions table has been removed. Please see the updated Custom Snippets Documentation for the new way to extend the default configuration of LuaSnip to add new loaders. -
which-keyoptions table has been removed. Which-key menu titles can now be easily added into themappingstable by setting a binding to a table with thenameproperty set and it will be passed towhich-key. For example, you can add the following to themappingstable:["<leader>b"] = { name = "Buffer" }. -
nvim-autopairsoptions table has been removed. Please see the updated Customize Autopairs Documentation for the new way to extend the default configuration of autopairs and adding more rules. -
cmpoptions table has been removed. Please see the updated Customize cmp Completion Documentation for the new way to extend the default configuration of cmp and running morecmpsetup functions. -
mason-lspconfig,mason-null-ls, andmason-nvim-dapoptions tables have been removed, please use the new plugin notation for extending these options like adding custom setup handlers. This is described in the Extending Core Plugin Config Functions Documentation. -
default_themehas been migrated to a dedicated plugin that can be used outside of AstroNvim as well at AstroNvim/astrotheme. This can be customized and configured the same as any other plugin, check the README for details on thesetupfunction. -
The bindings in
cmpto scroll the preview window for a completion item have moved to<c-u>and<c-d> -
<leader>pmappings for package and plugin management have been cleaned up to follow a common format amongst each other.<leader>psis now for checking Plugin Status and<leader>pSis for syncing plugins. Mason mappings have been moved to<leader>pmand<leader>pMfor Mason Status and Mason Update respectively. -
The dashboard mapping has been changed from
<leader>dto<leader>hfor the “Home Screen” -
The debugging menu has been moved from
<leader>Dto<leader>dfor quicker and more comfortable usage. -
HandLhave been changed to[band]brespectively for changing tabs in the UI. This is for both switching buffers as well as neo-tree sources in the explorer. This can be changed in the your user configuration by adding the following entries to yourmappings.ntable (This uses an internalastronvim.utils.bufferfunction that follows the tab positioning and also allows for using a number to move by multiple tabs at once):
L = { function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, desc = "Next buffer" },
H = { function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, desc = "Previous buffer" },
-
headeroption has been removed in favor of decreasing abstractions. Check the updated Dashboard Customizations Documentation -
<leader>shas been unified with the<leader>fmenu rather than spreading the Telescope mappings out across two menus. Please check the new mappings by pressing<leader>for in the updated Mappings Documentation -
Heirline has moved to a more sustainable configuration format for their
setupcall. Before it was configured withrequire("heirline").setup(statusline, winbar, tabline), this has moved to a new format with a single table likerequire("heirline").setup({ statusline = statusline, winbar = winbar, tabline = tabline, statuscolumn = statuscolumn }). If you have a custom Heirline configuration please check out the updated Customizing Statusline Documentation as well as the updated Heirline Documentation. (Note: also that along with all of the other core plugin setups, the abstractions have been removed and you will need to update to the new Lazy syntax described in the Custom Plugins Documentation) -
lsp.skip_setupoption has been removed as the new and improvedlsp.setup_handlersoption makes this easy. If you are using this option for LSP specific plugins, check up the updated Advanced LSP Setup Documentation. This page also includes the new format for setting these plugins up with Lazy.nvim. -
The
default_tbl(override_tbl, default_tbl)internal function has been removed and replaced withextend_tbl(default_tbl, override_tbl). If you use the original function anywhere in your config, remember to rename it and change the order of the parameters. Also note that this now lives inastronvim.utilsrather than the globalastronvimtable. This can be accessed withrequire("astronvim.utils").extend_tbl(default_tbl, override_tbl).