Migrating to 2.2 – 2.8¶
CodeArt 2.2 moves your settings to a new file, 2.3 replaces several plugins with smaller or built-in alternatives, 2.5 moves CodeArt's Lua modules under lua/codeart/, 2.7 moves rust-analyzer options to config.rustaceanvim, and 2.8 moves your settings and packs into the user/ folder. Your old settings keep working: CodeArt maps them onto the new names (lua/codeart/compat.lua) and shows a one-time notice where something changed. Only code that calls CodeArt's modules by their old names needs a change in 2.5. See the CHANGELOG for every detail.
Getting ready for 3.0¶
2.9 changes nothing you need to act on, and announces what 3.0 removes: the 2.1 lua/user_settings.lua, :CodeArtMigrateSettings, the renamed settings below, and disable_plugins.<name> = false for off-by-default plugins. If your setup uses one of them, you get a one-time notice after updating, and :checkhealth codeart lists them. See the Stability policy.
2.8: your files move to user/¶
Your files now live in one git-ignored folder, user/, next to init.lua; lua/ is only CodeArt's code. Nothing to do for most people: on the first start of 2.8 CodeArt moves them for you and says what it did once.
| 2.7 and older | 2.8 |
|---|---|
codeart_settings.lua |
user/settings.lua |
codeart_settings.lua.bak, .bak-<date> |
user/backup/ |
languages/<name>.lua |
user/languages/<name>.lua |
additional_plugins in the settings file |
still works; or one spec per file in user/plugins/ |
key maps and autocmds in config.other_configs |
still works; or user/keymaps.lua and user/autocmds.lua |
How the move works:
- Each file is copied, the copy is checked, and only then the original moves to
user/backup/. Nothing inuser/is overwritten, and starting again finds nothing left to move. - A symlinked
codeart_settings.luaorlanguages/(dotfiles) becomes a link to the same place, so your dotfiles keep working. - If both
codeart_settings.luaanduser/settings.luaexist, the newer one is used and the other goes touser/backup/. A pack inlanguages/that differs from the one inuser/languages/goes touser/backup/languages/. Either way you get a note. - If the move fails (for example a file named
useris in the way), CodeArt says why and keeps using the old files; fix the cause and run:CodeArtMigrateSettings. :checkhealth codeartshows what moved and any old files left behind.
Then:
- If your settings refer to the old paths in code, for example
dofile(vim.fn.stdpath("config") .. "/languages/x.lua"), change them (CodeArt's note mentions it). - Dotfiles: track
user/instead ofcodeart_settings.luaandlanguages/. - Going back with
:CodeArtUpdate rollbackto a version before 2.8 copiesuser/settings.luaanduser/languages/to the old places for it; 2.8 moves them back again.
2.7: Rust options move to config.rustaceanvim (breaking)¶
Only users of the rust pack who set rust_analyzer options in config.lsp are affected. The pack now uses rustaceanvim, which starts rust-analyzer itself, so vim.lsp.config("rust_analyzer", ...) no longer applies. Move the settings:
-- before (2.6)
M.config.lsp = function()
vim.lsp.config("rust_analyzer", {
settings = { ["rust-analyzer"] = { cargo = { allFeatures = true } } },
})
end
-- after (2.7)
M.config.rustaceanvim = {
server = {
default_settings = { ["rust-analyzer"] = { cargo = { allFeatures = true } } },
},
}
2.5: modules moved under lua/codeart/ (breaking)¶
All of CodeArt's Lua code now lives under lua/codeart/, so its generic module names (utils, settings, plugins, ...) can no longer clash with other plugins. The old names are gone; there are no forwarding modules.
| Old name | New name | File |
|---|---|---|
require("user_settings") |
require("codeart.settings") |
settings merged over the defaults (lua/codeart/settings.lua, filled by lua/codeart/user_config.lua) |
require("utils") |
require("codeart.utils") |
lua/utils.lua → lua/codeart/utils.lua |
require("settings") |
require("codeart.options") |
lua/settings.lua → lua/codeart/options.lua (editor options and commands) |
require("maps") |
require("codeart.maps") |
lua/maps.lua → lua/codeart/maps.lua |
require("theme") |
require("codeart.theme") |
lua/theme.lua → lua/codeart/theme.lua |
require("plugins") |
require("codeart.plugins") |
lua/plugins.lua → lua/codeart/plugins.lua (lazy.nvim specs) |
require("plugins.<name>") |
require("codeart.plugins.<name>") |
lua/plugins/ → lua/codeart/plugins/ (for example codeart.plugins.lsp.utils) |
What to do:
- Most people: nothing. Settings in
codeart_settings.luaare unchanged. - If your
codeart_settings.luaor one of your packs inlanguages/calls an old name, for examplelocal wk_add = require("utils").wk_add, change it to the new name (require("codeart.utils").wk_add). Until you do, CodeArt reports the load error with the new name to use and falls back to its defaults. :CodeArtMigrateSettings(copying an edited 2.1lua/user_settings.lua) rewrites the old names in the copy for you.lua/user_settings.luaitself is still in the repo, unchanged, as the input of that migration. It is not a module any more and goes away in v3.0.
2.2: the new settings file¶
- Settings now live in
codeart_settings.luanext toinit.lua. It is ignored by git and merged overlua/codeart/defaults.lua, so it only needs the values you change. - If you edited
lua/user_settings.lua, CodeArt keeps using it and asks once whether to copy your edits intocodeart_settings.lua. You can also run:CodeArtMigrateSettingslater (an existing file is backed up first). - After migrating, restore the tracked file so updates fast-forward cleanly:
git -C ~/.config/nvim checkout -- lua/user_settings.lua
lua/user_settings.luastays in the repo unchanged until v3.0, then it will be removed.
2.3: replaced plugins¶
| Removed plugin | Replaced by | What to do |
|---|---|---|
| Comment.nvim + nvim-ts-context-commentstring | Neovim's built-in gc/gcc, ts-comments.nvim and CodeArt's own gco/gcO/gcA, gb/gbc and <leader>/ maps |
Nothing; the maps work as before |
| mkdir.nvim | Built-in autocmd that creates missing parent folders on :w |
Nothing; same flag (mkdir) |
| nord.nvim | nordic.nvim | colorscheme nord still loads nordic (one-time notice) |
| true-zen.nvim | snacks.nvim zen and zoom | <leader>bm zooms, <leader>bz toggles zen; :TZFocus, :TZAtaraxis, :TZNarrow, :TZMinimalist still work but are deprecated |
| neoscroll.nvim | snacks.nvim scroll | Still off by default; set disable_plugins.smooth_scroll = false to turn it on |
| lsp_signature.nvim | blink.cmp signature help + a built-in end-of-line parameter hint | Nothing; <C-k> in insert mode toggles the signature window |
| vim-resize | Built-in edge-aware resize module | Default keys are now <C-Left/Right/Up/Down>; see below |
Renamed settings¶
| Old setting | New setting | Notes |
|---|---|---|
disable_plugins.nord |
disable_plugins.nordic |
Notice if it was true |
disable_plugins.truezen |
disable_plugins.snacks |
Notice if it was true |
config.true_zen |
config.snacks |
Old options are ignored (notice) |
disable_plugins.neoscroll |
disable_plugins.smooth_scroll |
Notice if it was false (you had smooth scrolling on) |
config.neoscroll |
config.snacks.scroll |
Old options are ignored (notice) |
disable_plugins.lsp_signature |
disable_plugins.signature_hint |
If it was true, blink's signature window is also turned off (unless you set config.blink.signature.enabled) |
config.lsp_signature |
config.blink.signature (window) and config.signature_hint (hint) |
Old options are ignored (notice) |
disable_plugins.vim_resize |
disable_plugins.resize |
Notice if it was true |
disable_plugins.ts_context_commentstring |
disable_plugins.ts_comments |
true disables ts-comments.nvim (notice) |
config.ts_context_commentstring |
config.ts_comments |
Old options are ignored (notice) |
config.comment |
(none) | Comment.nvim options are no longer used (notice) |
disable_plugins.comment = true |
(same flag, new meaning) | Turns off CodeArt's extra comment maps and ts-comments.nvim; built-in gc/gcc stay (notice) |
If you set both the old and the new name, the new one wins. Each notice is shown once; the markers live in stdpath("state")/codeart/notices/.
Key changes to know about¶
- Resize keys.
H,J,KandLare stock Vim motions again. Splits resize with<C-Left>,<C-Right>,<C-Up>and<C-Down>in normal and terminal mode. To get the old Shift+h/j/k/l maps back:
M.config = {
resize = { keys = "shift_hjkl" },
}
- macOS: Ctrl+Left and Ctrl+Right switch Spaces by default, so the terminal never sees them. Turn those shortcuts off in System Settings → Keyboard → Keyboard Shortcuts → Mission Control, or use
keys = "shift_hjkl". <C-k>in insert mode toggles blink.cmp's signature window, which takes over Neovim'si_CTRL-Kdigraphs while blink.cmp is enabled.- Smooth scrolling hides the cursor during the animation (
config.snacks.scroll.hide_cursor, needstermguicolors). - lspsaga is off by default.
<leader>la,<leader>lh,<leader>lr,<leader>ldand<leader>lgj/<leader>lgkuse Neovim's built-in LSP functions, and Neovim's ownK,grn,gra,grr,gri,grt,gO,]d/[dand<C-w>dwork too (see Key maps). Setdisable_plugins.lspsaga = falseto turn lspsaga back on. Acodeart_settings.luamigrated from a 2.1lua/user_settings.luacontainslspsaga = falseand keeps it on.
Older versions¶
Coming from 1.x or early 2.x? These renames apply:
config.null_ls→config.conform/config.lintconfig.cmp→config.blinkconfig.nvim_tree→config.neo_treedisable_plugins.nvim_tree→neo_treedisable_plugins.null_ls→conform/lintdisable_plugins.nvim_cmp/cmp_*→blink_cmpdisable_plugins.symbols_outline→outline
CodeArt 2.1 also moved to the nvim-treesitter main branch and needs Neovim 0.12+ and tree-sitter-cli; see Update.