aerial.nvim
aerial.nvim copied to clipboard
Initialize aerial as a plugin
With this, Aerial works just by being present in runtime path. No requires are called on initialization, which should keep its impact on startup time to the minimum.
Configuration is read from vim.g.aerial_nvim_config
on the first
load of aerial.config
, highlights are similarly created on the
first execution of aerial.highlight
. This allows one to set up
configuration adjustments in, for example,
.config/nvim/plugin/aerial.lua
and have the plugin just work, if it's
present.
I've intentionally dropped an eager command repeat on potentially loading state. If information is not present, it's simply not present. With LSP, it's natural to wait for LSP to initialize, with TreeSitter current symbols fetcher is synchronous, so waiting for parsing is baked in.
I don't use recession, and with no tests for recession integration, this change might've broken something.
While this partially reverts an older move away from global configuration, I believe that this PR achieves the best of both worlds by using global configuration once with an ability to use .setup
call to reapply changes in configuration or apply a separate configuration altogether.