v4.0.0
版本发布时间: 2024-04-01 21:08:26
AstroNvim/AstroNvim最新发布版本:v4.26.5(2024-09-24 22:20:36)
4.0.0 (2024-04-01)
After nearly 10 months of development and some amazing work by the community we are very happy to release AstroNvim v4. This major update is a complete refactor and restructure of AstroNvim into more modular distribution method. Rather than the user cloning the AstroNvim repository directly, the user will simply add it as a plugin into their own Neovim configuration with the lazy.nvim
plugin manager and import the plugins it provides. We have put together a simple GitHub template to quickly get started in making a new lazy.nvim
powered Neovim config: AstroNvim Template.
Configuration has also been moved from this repository into a collection of core plugins: AstroCore, AstroUI, AstroLSP which follow the same plugin configuration pattern as the rest of the Neovim ecosystem.
Check out the new AstroNvim Documentation as well as the v4 Migration Guide to get started!
Below is the full CHANGELOG:
⚠ BREAKING CHANGES
-
mappings: change
gT
togy
for type definition to avoid conflict with core mapping - move
signs
anddiagnostics
configuration to AstroCore - mappings: change some UI/UX mappings to make more sense
-
options: move vim options to AstroCore
opts
- ui: unify capital/lowercase meaning for global/buffer
- remove
mini.indentscope
and just useindent-blankline.nvim
-
treesitter: change loop text object from
l
too
- astrolsp: configure signs separately from diagnostics
- remove
schemastore
from default plugins -
mappings: make
<Leader>uc
and<Leader>uC
toggle buffer/global cmp and move colorizer toggle to<Leader>uz
-
plugins: move from
null-ls
to maintained forknone-ls
- ui: use mini.indentscope for highlighting current context (#2253)
-
neo-tree: remove
o
binding, conflicts with new "Order by" keymaps -
mason: rename
MasonUpdate
andMasonUpdateAll
toAstroMasonUpdate
andAstroMasonUpdateAll
- move configuration defaults to
opts
tables - move updater, git, and mason utilities to
astrocore
- move buffer to
astrocore
and icons toastroui
- move resession extension to AstroCore
- make resession the default session manager
- move status API to AstroUI
- move colorscheme to AstroUI and polish to AstroCore
- move astronvim.user_terminals to AstroCore
- remove deprecated plugin configs and unnecessary LSPLoaded icon
- move UI/UX utils to
astrocore
- move astronvim specific options to AstroCore options
- move Heirline
setup_colors
function to AstroUI - move plugins and lazy_snapshot into
astronvim
module - move to a model of just providing plugins
- remove updater mappings and commands
-
astrolsp:
setup_handlers
renamed tohandlers
- drop support for Neovim v0.8
-
plugins: use
on_load
and remove some unnecessaryconfig
functions - modularize config with AstroCore, AstroUI, and AstroLSP
Features
-
large_buf
can be set tofalse
to disable (73d521e) - add
<Leader>SF
to search all previous directory sessions (ab9455a) - add
AstroLargeBuf
autocmd user event and updatemax_file
usage tolarge_buf
(efaf0e5) - add
AstroUpdate
to update Lazy and Mason (0e0d8bd) - add
init.lua
to warn user if they try to use AstroNvim as a direct Neovim configuration (0e0d8bd) - add
vim.g.astronvim_options
as an optional function for setting up options (0e0d8bd) - add configuration of plugin pinning (9d1376d)
- add Neovim version detection on startup (ad934f0)
-
alpha: use built in
button
function from Alpha (1ad1e1e) -
astrocore: disable rooter
autochdir
by default (be5ee14) - astrocore: enable built-in project rooting by default (9a8b7d1)
- astrocore: increase the default size for large files (e0b826d)
-
astrolsp: configure
vim.lsp.handlers
in configuration (ab008dd) - astrolsp: don't add formatting mappings when formatting is disabled (26147a6)
-
astrolsp: move lsp autocommands to AstroLSP
opts
(8fe55d0) -
astrolsp: move lsp user commands to AstroLSP
opts
(2c19d9e) - cmp: add buffer local cmp completion control (815ee79)
-
cmp: allow
LuaSnip
to be disabled (7958c12) -
cmp: fallback to
vim.snippet
if available and no other snippet engine configured (424f46b) -
cmp: set
group_index
for lsp and buffercmp
sources (bfb01ee) -
config: add ability to configure
mapleader
andicons_enabled
in AstroNvimopts
(27adb26) -
config: move
maplocalleader
to AstroNvimopts
to be set up before Lazy (668691d) - dev: add dev utility to generate snapshot for stable releases (5081890)
- gitsigns: use new preview hunk inline (463be1a)
- heirline: add virtual environment component (7761b63)
- indent-blankline: migrate to indent blankline v3 (c2e15ee)
-
lazy: use
$LAZY
environment directory for lazy dir if available (1e93c9c) - make resession the default session manager (0e0d8bd)
-
mappings: make
<Leader>uc
and<Leader>uC
toggle buffer/global cmp and move colorizer toggle to<Leader>uz
(cfa1962) - move to modular plugin for configuring LSP options (0e0d8bd)
- move to modular plugin for configuring mappings and autocmds (0e0d8bd)
- neo-tree: add shift+enter to system open files (7a20dc7)
-
nvim-lspconfig: add lazy loading on
nvim-lspconfig
commands (495a17a) - nvim-treesitter: disable all treesitter modules for large buffers (a92f05d)
- options: enable confirm by default (d8055ac)
- options: use the histogram algorithm for diff calculations (f1cfd02)
-
plugins: add
todo-comments.nvim
to the base installation (4d690ca) -
plugins: move from
null-ls
to maintained forknone-ls
(b4687e3) -
plugins: move to
vim-illuminate
to reference highlighting (1749d5a) -
plugins: use
on_load
and remove some unnecessaryconfig
functions (0e0d8bd) - remove
mini.indentscope
and just useindent-blankline.nvim
(0e23d5b) -
resession: add
<Leader>SD
for deleting a directory session (e4c586c) -
resession: add
<Leader>SS
to save current directory session (76018e9) -
treesitter: change loop text object from
l
too
(2ed7eb3) -
treesitter: enable
auto_install
if user has thetree-sitter
CLI (ca0db4e) - ui: use mini.indentscope for highlighting current context (#2253) (c2e15ee)
Bug Fixes
-
astrocore.utils
moved toastrocore
(0e0d8bd) - alpha: fix alpha on fresh installation (16e2805)
- alpha: patch alpha button function until resolved upstream (fb94050)
-
astrocore:
syntax
toggle renamed tobuffer_syntax
(0e0d8bd) - astrocore: prefer version control over project files (41c63b9)
-
astrolsp:
setup_handlers
renamed tohandlers
(0e0d8bd) - astrolsp: configure signs separately from diagnostics (10929d5)
-
astrolsp: move
signs
to new dictionary format (96bb76f) - astrolsp: update autoformat_enabled to autoformat (0e0d8bd)
- astrolsp: update lsp mapping conditions (0e0d8bd)
- astrolsp: which-key integration fixed (0e0d8bd)
- astroui: add missing gitsigns handlers (9d593be)
- autocmds: always fire "AstroFile" if in a vscode session (5fb7345)
- autocmds: fix large buffer detection autocmd (2bfce12)
-
autocmds: silently fail if
augroup
has already been deleted (f77ec3f) - autocmds: use quotes in git command on windows (b5ef0d2)
-
cmp: use
completeopt
fromvim.opt
rather than hard coding innvim-cmp
(a2b3571) - disable cmp for large buffers (8b81aa5)
- disable completion and indent guides for large buffers (8b81aa5)
- fix initial startup ordering (0e0d8bd)
- heirline: only apply sidebar padding for non full-width windows (548a4c1)
-
heirline: update to new
file_info
component defaults (cf3974f) - improve first installation path (0e0d8bd)
- indent-blankline: improve lazy loading (d9592cd)
- init: improve initialization sequence (0e0d8bd)
- lspconfig: resolve lsp attaching when new filetype buffer is not focused (4f568eb)
-
mappings: change
gT
togy
for type definition to avoid conflict with core mapping (fe0e3d7) - mappings: change some UI/UX mappings to make more sense (77ba866)
- mappings: fix incorrect mapping key casing (a5cf6a0)
- mappings: move diagnostic mappings to always loaded (e575551)
-
mason: rename
MasonUpdate
andMasonUpdateAll
toAstroMasonUpdate
andAstroMasonUpdateAll
(9be64b9) - neo-tree: add missing fold icons from AstroUI (bea5d52)
-
neo-tree: disable
foldcolumn
in neo-tree (61e05d4) - neo-tree: fix autocmds (0e0d8bd)
-
neo-tree: improve
h
andl
navigation edge cases for empty directories and nested files (f7f3204) -
neo-tree: remove
o
binding, conflicts with new "Order by" keymaps (ba92f46) -
notify: add icon disable support to
nvim-notify
(fcb833c) - notify: return after closing window (d68514c)
- nvim-treesitter: force install parsers bundled with neovim (3bd128e)
- options: add error reporting to malformed user options (d9eb52d)
- options: don't concatenate boolean in error message (90f3c3b)
- options: initialize buffer list on startup (8ea4190)
- plugins: don't use the shorthand notation for plugins (0e0d8bd)
-
plugins: make sure
mason
is set up before mason plugins (4afe41a) - status: allow for function in colors definition (0e0d8bd)
-
status: use user provided
status.colors
table for overriding (0e0d8bd) - ui: unify capital/lowercase meaning for global/buffer (cf50450)
- which-key: remove separator icon when icons are disabled (281606e)
- which-key: use a more minimal which-key separator (a5be725)
Performance Improvements
-
autocmds: improve performance of
AstroFile
detection (09144c5) - heirline: simplify buffer matcher for disabling winbar (91fd4d5)
- heirline: use logic to calculate offset rather than hardcoded list (72e1780)
- improve initial installation and startup performance (432897f)
- improve performance of triggered plugin loading (bae0ad7)
- mappings: remove unnecessary check (0e0d8bd)
- options: set options directly (0e0d8bd)
- plugins: lazy now ignores plugin fragments if a plugin is disabled (811a0b1)
-
toggleterm: optimize toggleterm
on_create
function (c6a9f03)
Miscellaneous Chores
- remove deprecated plugin configs and unnecessary LSPLoaded icon (0e0d8bd)
Code Refactoring
- drop support for Neovim v0.8 (0e0d8bd)
- modularize config with AstroCore, AstroUI, and AstroLSP (0e0d8bd)
- move
signs
anddiagnostics
configuration to AstroCore (7898fcd) - move astronvim specific options to AstroCore options (0e0d8bd)
- move astronvim.user_terminals to AstroCore (0e0d8bd)
- move buffer to
astrocore
and icons toastroui
(0e0d8bd) - move colorscheme to AstroUI and polish to AstroCore (0e0d8bd)
- move configuration defaults to
opts
tables (0e0d8bd) - move Heirline
setup_colors
function to AstroUI (0e0d8bd) - move plugins and lazy_snapshot into
astronvim
module (0e0d8bd) - move resession extension to AstroCore (0e0d8bd)
- move status API to AstroUI (0e0d8bd)
- move to a model of just providing plugins (0e0d8bd)
- move UI/UX utils to
astrocore
(0e0d8bd) - move updater, git, and mason utilities to
astrocore
(0e0d8bd) -
options: move vim options to AstroCore
opts
(170774b) - remove
schemastore
from default plugins (aeb24b0) - remove updater mappings and commands (0e0d8bd)