Feb 2021: 0.5.3 Release
Time flies - can't believe it's been a month and it's time to release 0.5.3. It's nice to be able to share what's happening more frequently!
What's new in 0.5.3
CodeLens
Onivim now supports rendering inline elements between lines of code - and we use it in Onivim 0.5.3 to implement CodeLens, which is contextual information interspersed with source code.
It's particularly useful for working with ReasonML or OCaml, because those extensions show the type signatures that are being inferred, as you edit:
Having that live type inference for those languages is a tremendous time-saver!
However, there are several other extensions that use CodeLens, too. For example, the bundled JavaScript & TypeScript extensions can show reference counts for functions and classes:
(The TypeScript and JavaScript extensions require setting the "typescript.referencesCodeLens.enabled"
and "javascript.referencesCodeLens.enabled"
configuration settings to true
, respectively).
The C# extension uses CodeLens to show reference counts:
In addition, language extensions like Elm use CodeLens to show reference count, as well as which functions are part of the public interface:
This is a feature that I had always wanted in Onivim v1, but never could get quite right. In Onivim v1, we were constrained to the editor model as a terminal-grid-of-characters - this makes it quite tricky to bolt-on rendering this interspersed contextual information. However, because Onivim v2 handles the complete rendering pipeline for the editor surface, and is decoupled from the editor being modeled as a terminal-grid-of-characters, it becomes easier, or at least tractable, to implement.
Even still, there were many challenges with performance, with animation, with aligning the viewport to minimize 'jerk', and CodeLens touches many other features such as word wrap and scrolling. In particular, our function that maps 'buffer position' (a line and a byte) to 'pixel space' needed to be updated to account for inline elements like CodeLens taking up space (and be quick to calculate when changed, as occurs when the inline elements animate open).
It's an exciting feature, though, because the infrastructure for these inline elements is fairly general - meaning Onivim can potentially render arbitrary UI in between lines. I'm looking forward to building on this foundation in the future to implement other features, like an inline diff view, or a keyboard accessible 'peek view' to show references or slices of code from other buffers, without needing to leave your current buffer. Let me know if you have ideas!
Some users may find this feature distracting, though, so you can turn off CodeLens by setting:
"editor.codeLens": false
in your configuration.
Menu bar
Finally... Onivim has a menu bar on all platforms!
On OSX, we integrate with the native application bar:
And the feature is also available on Windows and Linux, using a custom-rendered menu bar:
It's pretty spartan at the moment... but it provides the infrastructure necessary to add more commands.
The menu bar is on by default, but it can be turned off on Windows and Linux with the following configuration entry:
"window.menuBarVisibility": "hidden"
Thanks to @zbaylin for all the work done to wire up the native OSX APIs to support this feature!
Preview functionality
@fanantoxa has implemented a great feature for mouse users - preview functionality.
Preview mode, which is on-by-default, means that the tab for an editor is re-used when clicking on it via the file explorer (and for other views, like search). This is helpful for users who explore the workspace with the mouse, as it keeps editor tabs from cluttering up the split until they've settled on the right file to work with.
Thanks @fanantoxa for the awesome contribution!
Configurable font weight
In 0.5.3, the font weight for Onivim is configurable, courtesy of @marcagba! Another feature that has been a long time coming.
This is controlled by a newly added "editor.fontWeight"
setting:
Thanks @marcagba for your magnificent work implementing this!
Additional language servers
Onivim now bundles an HTML language server:
The HTML language server supports diagnostics, codelens, completion, and an outline view.
We've also bundled a JSON language server, which features diagnostics and outline view integration.
Extension host bug fixes
We've upgraded the extension host (from 1.51.0 to 1.52.1) - bringing us up-to-date with the Code extension host. Our goal is to be within a month of the official extension host, so that we can ensure that extensions stay compatible.
In addition, we've continued to fix blockers around extensions, notably:
- #2839, #2990 - Fix signature help staying open in normal mode and extra Escape key press
- #2995 - Fix blocking bugs for
nim
extension - #2999 - Fix diagnostics not displaying the
Elmtooling.elm
extension - #3000 - Fix out-of-order search results in extension pane (thanks @jakubbaron!)
Vim bug fixes
We've also continued to fix issues in our Vim layer - here's a snapshot of some of the changes:
- #2878 -
Control+[
now behaves likeEsc
across the UI - #2877 - Conflicting
Control+b
bindings were removed - #2871 -
Control+o
behavior in insert mode is fixed - #2884 -
:tabnew
/:new
/:vnew
behavior is fixed - #2891 - Fix count behavior for L/H jumps
- #2908 - Fix no-recursive remap behavior
- #2978 - Fix
m-
modifier key behavior
The full changelog can be found here: Changelog
The latest stable and nightly builds are available here: Early Access Portal
What's Next
For our 0.5.4 (March) build, we're still working towards the 0.6.0 goals on our timeline - in particular, the focus for 0.5.4 is integrating snippet functionality in the editor:
I'll look forward to updating you on the progress there next month.
Thanks for reading, and for helping us towards achieving this goal of "Modal Editing from the Future"! Your help, feedback, and support has been critical in allowing us to progress and push forward.
Stay safe and healthy!