0.19.0
What's Changed
- Add:
carbon.util.explore_path
(:h carbon-util-explore-path
) - Add:
carbon.util.window_neighbors
(:h carbon-util-window-neighbors
) - Add:
carbon.util.find_buf_by_name
(:h carbon-util-find-buf-by-name
) - Add:
carbon.util.tbl_some
(:h carbon-util-tbl-some
) - Add:
carbon.util.clear_extmarks
(:h carbon-util-clear-extmarks
) - Add:
carbon.util.add_highlight
(:h carbon-util-add-highlight
) - Add:
carbon.entry:highlight_group
(:h carbon-entry-highlight-group
) - Add: constant
carbon.constants.directions
(:h carbon.constant-directions
) - Add: setting
carbon.settings.open_on_dir
(:h carbon-setting-open-on-dir
) - Add:
carbon.health
module - Rename: setting
carbon.settings.always_reveal
tocarbon.settings.auto_reveal
- Rename: helptags
carbon-constants-*
tocarbon-constant-*
- Remove:
vim.g.carbon_lazy_init
- Remove:
carbon.initialize
- Remove:
carbon.entry:set_compressible
- Remove:
carbon.entry:is_compressible
- Remove:
carbon.entry:set_open
- Remove:
carbon.entry:is_open
- Replace:
carbon.buffer
module withcarbon.view
module- Add:
carbon.view.find
(:h carbon-view-find
) - Add:
carbon.view.get
(:h carbon-view-get
) - Add:
carbon.view.activate
(:h carbon-view-activate
) - Add:
carbon.view.current
(:h carbon-view-current
) - Add:
carbon.view.execute
(:h carbon-view-execute
) - Add:
carbon.view.close_sidebar
(:h carbon-view-close-sidebar
) - Add:
carbon.view.close_float
(:h carbon-view-close-float
) - Add:
carbon.view.handle_sidebar_or_float
(:h carbon-view-handle-sidebar-or-float
) - Add:
carbon.view:get_path_attr
(:h carbon-view-get-path-attr
) - Add:
carbon.view:set_path_attr
(:h carbon-view-set-path-attr
) - Add:
carbon.view:buffers
(:h carbon-view-buffers
) - Add:
carbon.view:buffer
(:h carbon-view-buffer
) - Add:
carbon.view:current_lines
(:h carbon-view-current-lines
) - Add:
carbon.view:parents
(:h carbon-view-parents
) - Add:
carbon.view:switch_to_existing_view
(:h carbon-view-switch-to-existing-view
) - Remove:
carbon.buffer.handle
- Remove:
carbon.buffer.launch
- Remove:
carbon.buffer.is_loaded
- Remove:
carbon.buffer.is_hidden
- Remove:
carbon.buffer.clear_namespace
- Remove:
carbon.buffer.clear_extmarks
- Remove:
carbon.buffer.entry_line
- Replace: existing helptags
carbon-buffer-*
withcarbon-view-*
- Add:
This release is a BREAKING release. A fair amount of documented APIs has changed
but due to not being at a stable 1.0.0 version yet only the minor version number will be bumped.
Exploring multiple directories
This release aims to fix one major limitation Carbon had which was that Carbon was
only ever able to show a single file tree (the current working directory). This is
no longer the case. Explore commands now support an optional path argument i.e.
:Carbon relative/nested/dir
:Carbon /absolute/dir
:Carbon ../other/folder
The above works for any Carbon explore command such as Carbon
, Lcarbon
, Rcarbon
and their NetRW aliases (if carbon.settings.keep_netrw
is false
).
On top of that Carbon gained a new setting :h carbon-setting-explore-on-dir
which is enabled by default and will cause :e [directory]
to open a Carbon
buffer for given [directory]
.
To properly support this feature the existing buffer
module no longer sufficed.
Thus it has been replaced entirely by a new view
module of which multiple
instances manage their respective root directories. A lot of the functionality
which existed in the buffer
module has been moved to view
. Some buffer
functions became redundant or have been moved to util
.
Set up using different package managers
Carbon used to initialize itself automatically however this led to some
issues depending on which package manager was used since some implementations
deviate from native Vim package behavior. This caused settings set via
the setup
function to sometimes be ignored because initialize
had
already been called which blocks additional invocations of setup
.
As of this release, it is required to call carbon.setup
. Carbon
will not attach itself until this function has been called.
Requiring this behavior is not ideal, but should provide a consistent
experience across any environment since everything is managed via a
single setup
hook.
Finally, because of this change vim.g.carbon_lazy_init
is no longer
supported to skip automatic initialization since users will now be
able to call setup
when they want to initialize Carbon.
Full Changelog: v0.18.3...0.19.0