Devlog - 2024

December 24, 2024

Windows native clipboard support

I spent the morning dog-fooding flow on windows. I added native clipboard support, so now (finally) pasting code blocks does not munge their formatting, and you can now use the regular ctrl+v keybinding on windows instead of your terminal’s paste function (ie. ctrl+shift+v). Also, I fixed alt+shift+ keybindings, which were broken on windows (and no-one seems to have noticed!?).

December 19, 2024

Binary releases

Flow Control get it’s first binary release! 🎉🍾🥳

neurocyte/flow/releases/tag/v0.2.0

December 18, 2024

Auto UTF-8 sanitization

Flow will now read non UTF-8 files with out crashing. It’ll do a simplistic 8bit to UTF-8 transcoding and display a warning in the status bar. Writing the file will save it as UTF-8 and what you see is what you get. This is really simplistic, but at least for most western european codepages it should pretty much do the right thing.

December 10, 2024

File type palette

Another day, another feature. Today’s feature-of-the-day is a new file type palette. You can now change the current file type on the fly with the Change file type command.

December 05, 2024

Keybind configuration

Today I merged the configurable keybindings branch! You can now customize your keybindings with the Edit key bindings command. This will open the keybindings json file in the configuration directory for the mode you are using. If the file does not yet exist it will be created from the built-in configuration. You can also save your keybinding configuration under a new file name to create a whole new keybinding mode.

To help with editing the keybindings there is a new command insert_command_name that will list all available commands (not just those in the command palette) and insert the command name into the current file. This is usually bound to ctrl+f2. Commands can take arguments which are hinted in the insert_command_name list and may be added after the command name in the keybinding declaration. For example: ["ctrl+f9", "set_theme", "1984"],

Thank you to @Robert Burnett for getting the ball rolling on this and writing the vim style keybind parser!

November 25, 2024

Expand/shrink selection

Today I added implementations for the tree-sitter based expand/shrink selection commands. And also select next/previous sibling commands. Now you can move your selection around based on the tree-sitter syntax tree. These commands are bound to alt+shift+left/right and alt+home/end respectively. (in flow mode)

November 04, 2024

Theme alpha channel support

Today I added proper support for alpha blending of theme colors. This fixes a lot of issues with themes, especially light themes and should improve the overall polish of flow quite a bit.

October 29, 2024

New themes, new comamnds and more

Various minor features have been added over the past week. A new group of themes called Catppuccin. Swift language syntax highlighting. A new command Open previous file, useful for toggling between two files. And as always, many minor bug fixes and improvements.

Today I pushed a major refactor of our tree-sitter incremental parsing support. Flow now uses a diff algorithm (dizzy) to generate tree-sitter edits on each frame (if there are changes) instead of directly translating individual edit operations into tree-sitter edits on every change. This seems to get us much more predicatable and reliable results from tree-sitter.

Major refactoring of the keybinding system is still underway. When that is complete we will be able to move forward with support for dynamic keybindings. This will allow plugins to configure keybinds at runtime.

October 19, 2024

Modal palettes

Small quality of life UI fix today. Palettes are now properly modal and you can cancel them by clicking outside of the palette. This brings Flow a little closer to common GUI UI patterns. Also, just for fun, added a slight dimming effect to the modal background.

And a fade effect…

Fade effects are controlled by the animation_max_lag configuration parameter.

October 14, 2024

New args parser

Today flow’s CLI got a nice revamp thanks to Joe Mckay and his flags zig library. This also brings improved error messages on invalid parameters. Thanks Joe!

October 12, 2024

Toggle highlighting

You can now toggle syntax highlighting with S-F10 or the Toggle syntax highlighting command. This is not persistent, it’s just for the currently open file. Also, the --no-syntax command line option will now leave LSP support and file type detection enabled and just disable syntax highlighting globally for the current session. You can still then turn it back on with Toggle syntax highlighting.

October 10, 2024

Improved whitespace rendering

Today I made some improvements to whitespace rendering. Indent size and tab width are now configurable and there is a third whitespace rendering mode that renders indent guides.

Also, I added proper support for editing CRLF files and changing the line ending mode a couple of weeks ago and forgot to mention it here before going on vacation.

September 10, 2024

Hover

Today’s feature is hover information support. Hold down Alt and hover with the mouse to fire off a hover LSP request. You can also use the keybinding, in flow/vim mode and in helix mode. Also, Alt-LeftClick is goto_definition, which complements hover mode nicely (goto_definition is not new though).

The information view is fairly simple. It does not render the markdown or allow clicking on links in the content yet.

August 30, 2024

Save as

Feature of the day. Save As! The save as command uses the same file browser mini mode as open file, so you can complete existing directory and file names. This can be used to copy, replace or create new files.

August 29, 2024

Improved open file completion

Pressing tab at the open file now completes from with a simple prefix match just in the directory instead of fuzzy matching across the entire project. This is much more like vim, emacs, vscode, etc. and lays some ground work for adding a file browser later.

August 27, 2024

Format on save

Flow can now automatically format on save. You can enable it in the configuration file with the enable_format_on_save option.

August 26, 2024

Open file fuzzy completion

Pressing tab at the open file prompt will now fuzzy complete the file name from the project MRU file list. Pressing tab multiple time will cycle to the next best matching file.

August 26, 2024

Clock widget & beam cursor

I’ve added a simple clock widget. You can add it to your bars wherever you want with the “clock” tag. It is not enabled by default.

Thanks to @rockorager vim & helix modes will now show a beam cursor in insert mode and an underline cursor in visual/select mode if you have “enable_terminal_cursor” turned on in your config. Only on the primary cursor though as terminals do not support more than one native cursor.

August 25, 2024

Status bar configuration

Flow’s statusbar is now much more configurable. Instead of individual config switches to enable/disable each widget, you can now configure the position of each widget with a string. Also, there is now an optional top bar too and a new expander widget to help centering or spacing out widgets. Have fun!

August 19, 2024

Open recent project

Today I finally implemented the open recent project command. Now you can quickly switch projects with C-r. Switching projects will also change the current working directory in the terminal so that new terminal splits and tabs will open at the correct location.

August 17, 2024

Cross file diagnostics

Today’s feature is diagnostics in other files. If your LSP returns diagnostics messages for a file (or files) you are not currently editing, then flow will display them in the file list panel and let you jump to the location with A-n or mouse click.

You can also show diagnostics for the current file with C-S-m or by clicking on the diagnostics summary in the status bar.

August 17, 2024

Find all references

Today I finished off the find all references command. Enjoy!

August 16, 2024

Non-tree-sitter build support

You can now build Flow entirely without tree-sitter with zig build -Duse_tree_sitter=false. This will give you a tiny executable that is much more suitable for really small devices. Add it to all your docker containers and never use nano ever again! (ok, it’s not quite that small)

Also, you can now start the regular build of flow with –no-syntax if for some reason you don’t want syntax highlighting.

Also, 32 bit arm builds should now work. (with -Duse_tree_sitter=false)

August 16, 2024

Find all refs prep work

Started work on the find all references command (S-f12). It is working already, but I still need to add more detail to the results list. Also, you have to manually clear the list at the moment (C-j). Navigation of the results works the same as with find in files.

August 14, 2024

Theme panel

Feature of the day today is a new way to select themes. The list is getting long, so now there is a palette just for selecting themes. This also brings easily reusable palettes, so adding other features that need a palette type interface is now easy.

August 13, 2024

Panel views mouse control

Flow’s panel views can now be resized with the mouse!

August 12, 2024

File list view keybinds and terminal background

Today I added up/down/enter keybindings to find in files mode so it is possible to browse the match list via keyboard before jumping to a specific match.

Also, flow now sets the terminal background color to match the selected theme. This makes borders a little less ugly if your terminal does not resize in grid steps. It also reduces resizing flicker on some terminals and enables transparency effects on others.

August 11, 2024

File list view update

Today I finished off the file list view. It is now scrollable with keyboard, mouse wheel and scrollbar. Also made it a little prettier. I fixed a few minor issues with the command palette too.

Oops, I forgot to record the mouse cursor. 😂 You all get the idea though I hope.

August 08, 2024

Windows TLC

I gave the windows version some TLC today. Subprocess stdin input now works correctly and the project manager encodes and decodes LSP URLs with windows file paths.

This means that language server and language formatter support in Windows is now on par with Linux and MacOS. 🎉

Pasting on windows now uses the internal clipboard by default as Windows doesn’t support bracketed paste. You can still paste from the system clipboard with C-S-v.

August 07, 2024

Fixing

Mostly bug fixing today. In-band resize support is properly reset on exit now which eliminates the junk at your prompt if you resize your terminal after exiting flow. Also, find_in_files will no longer cause an integer overflow error if it matches the beginning of a line.

August 05, 2024

Extra large file support

Support for loading very very large files is now merged. I’ve tested files up to around 270 million lines large at around 4GB. File size should now be limited only by the available memory. Required RAM is around 8 times the file size. On my machine loads files at around 8 seconds per GB, which I think is fairly acceptable.

July 30, 2024

CLI list languages and execute commands

Today I added some CLI arguments:

        --list-languages
            Show available languages.

    -e, --exec <command>...
            Excute a command on startup.

--exec allows you to execute mini scripts on flow startup.

For example to change flow’s whitespace setting:

flow --exec toggle_whitespace --exec quit

Or open and move to the end of a file:

flow src/main.zig --exec move_buffer_end
July 29, 2024

Performance tuning

Two major performance enhancements today. One to make tree-sitter re-parsing not require a re-serialization of the entire buffer on every edit. And the second dramatically reduces the number of egc_length calls (aka, graphemeIterator) needed to create tree-sitter edit updates. Editing very, very large files (Sema.zig anyone?) should now be lag free again, at least for one cursor, and editing with multiple cursors should scale much better.

July 28, 2024

File list jump commands

Today I’ve added commands and keybindings (A-n/p) for jumping through the file list view. These are the same keybindings as next/previous diagnostic, but they are only active if the file list is visible.

July 28, 2024

Find in files results

Today I did some more work on a results list for the find in files command. It’s not quite complete yet, but already quite usable.

July 22, 2024

Recent files & superhtml

I’m back from vacation and development work will now continue. Today brings some minor improvements to the rendering of the open recent file list and superhtml support (shtml).

July 10, 2024

New language support

Added yaml syntax highlighting today. Previously also added nim, nimble and kdl.

July 09, 2024

Colored undercurls

Flow now has colored undercurls for diagnostics.

(if the terminal supports them)

July 09, 2024

Just fixing

Sorry that the dev-log is so quiet. I haven’t stopped working on flow or anything, but it’s been all fixes and tweaks for the last week or so. I only report on new user visible features here. And then only if they’re not discussed in any of the other channels.

June 27, 2024

Windows fixes

Lot of fixes for flow on windows today. Fuzzy find, window size, some integer overflows and subprocess calls. Just LSP URIs left to fix.

Also, the inspector view is now working again (everywhere).

June 23, 2024

CLI project support

You can now open directories (aka projects) on the command line. Only one is allowed. All other files on the same command line will be opened relative to this project.

June 23, 2024

Command palette MRU persistence

Last used times are now persisted in ~/.local/state/flow/commands

June 23, 2024

State moved

Flow now stores it’s state files in ~/.cache/flow instead of ~/.local/state/flow

This better matches the XDG Base Directory Specification.

Move your existing state files with mv ~/.cache/flow ~/.local/state if you want to keep them.

June 22, 2024

Command palette MRU ordered

The command palette is now sorted by last used time. This helps a lot with repeating commands. Last used time is not persisted across sessions yet though.

June 21, 2024

Command palette improvements

Today’s blood sweat and tears brings keybinding hints, a scrollbar and page down/up commands to the command palette. 😅

This should help discoverability a lot for all those who were too lazy to RTFM. (that’s me 10 minutes after adding yet another keybinding 😂)

June 19, 2024

Command palette fuzzy matching

Fuzzy matching is now supported in the command palette and clicking the flow button will now open the command palette instead of switching input modes. Also fixed a crash with large bracketed paste operations (C-S-v in most terminals).

Still to come in the palette, English command descriptions (docstrings), active keybinding hints, MRU ordering persistence and (maybe/probably) command argument parsing with syntax hints.

June 14, 2024

Bug fixes & command palette

A few bug fixes today. Mostly fix for mouse and resize handling of menus and buttons.

Also, started work on the command palette. Lot’s to do still. Fuzzy find, show keybindings, last recently used sorting, etc.

Here’s something to look at in the mean time:

June 13, 2024

FreeBSD

Flow Control now runs on FreeBSD too!

June 08, 2024

Windows port has landed!

Aaaannd it’s merged!

libvaxis is now the default (actually only) renderer. This brings way broader terminal support and flow now runs pretty much anywhere, including Windows!

Windows support still has a couple of limitations (and bugs). Most notably, no mouse support and language server support is currently still in progress.

June 07, 2024

Windows porting

Getting close…

June 07, 2024

Notcurses dropped

I’ve dropped notcurses entirely in the version next branch. Doesn’t seem like it has any value now and I don’t need any extra maintenance burden.

June 07, 2024

Windows support in thespian

Thespian is building on windows now. I just need to add a windows variant of thespian’s async subprocess API, and then I can start porting flow to windows.

May 23, 2024

libvaxis backend completed

The libvaxis backend is now complete and far surpasses the notcurses backend in terms of compatibility. With libvaxis Flow now renders correctly in kitty, ghostty, iterm2, gnome-terminal, konsole, xterm, rxvt, alacritty, wezterm, foot, windows terminal and probably most others. Unicode works correctly in macos now (there were width bugs cause by macos libc) and cross compiling works everywhere (except for windows targets) with no additional dependencies to install.

I will switch the default backend to libvaxis as soon as I get around to re-writing the readme build section. I may even remove the notcurses backend soon as there seems like no reason to keep it, but I wait a little while just to be safe.

Flow Control in iTerm2

Flow Control in Windows Terminal

May 22, 2024

libvaxis copy & paste

Still working on the new libvaxis backend. Lot’s of changes to get it feature equivalent to the notcurses backend. I’m trying to keep as much as possible upstream so other zig TUI apps can benefit. Yesterday I added osc52 support to libvaxis (copy/paste) and today I will add detection of pixel mouse coordinate support. Then it’s hopefully just some bug fixing (drag detection, perhaps others) and I can think about making libvaxis the new default.

May 12, 2024

to_upper/lower

Today I added to_upper and to_lower commands. Bound to Alt-u and Alt-l.

May 10, 2024

Add remaining libvaxis styles

I’ve added the remaining styles to the libvaxis renderer. notcurses and libvaxis backends should look identical now.

May 10, 2024

libvaxis preview release

I have pushed the work-in-progress libvaxis backend to master and will continue work there. It is not enabled by default. If you want to try it out build with -Duse_vaxis=true which will produce zig-out/bin/flow-vaxis.

May 10, 2024

libvaxis nearing compleation

The libvaxis backend is nearing completion. Render times look good, although it’s not quite a perfect apples to apples comparison just yet because a few styles are still incomplete in the libvaxis version. That difference should be pretty minor though so I don’t expect this comparison to really change much.

May 09, 2024

libvaxis progress

libvaxis support is still a work in progress. I have most of the backend implemented, but I am battling to smooth out the bugs. There are a few major semantic differences between notcurses planes and libvaxis windows that I haven’t handled quite right yet.

May 09, 2024

LSP & tree-sitter sync fix

Today I fixed tree-sitter and/or LSP getting out of sync when editing. Both should stay properly synced now.

May 01, 2024

Refactor completed

Refactoring complete. The TUI layer in Flow no longer directly depends on notcurses. 🎉

Time to start real work on a libvaxis renderer.

April 27, 2024

Refactoring renderer

Development has not stalled. I’m working on a major refactor to bring in libvaxis as an alternative rendering backend. libvaxis is mostly on par with notcurses already, and moving forward I’d rather work on/contribute to upstream libraries written in zig.

April 20, 2024

Diagnostics rendering

Added rendering of diagnostics and goto next/previous diagnostic commands. (bount to Alt-n and Alt-p). Also added diagnostic counter widget to the status bar and fixed several bugs.

April 16, 2024

LSP diagnostics prep work

Added processing of textDocument/publishDiagnostics notification message from the language server. Ready to be rendered, but so far just logged.

April 15, 2024

Fuzzy finding

Added fuzzy finding in the recent files list via fuzzig, a nice zig fuzzy finder library that was released yesterday. Also fixed a couple of shutdown issues and an issue causing goto_definition and get_mru_position to over write each other.

April 11, 2024

Most recently used persistence

Today I added saving and restoring of the most-recently-used info on a per project basis. So the order of the open recent file list and the last cursor position will now persist across sessions.

April 09, 2024

Vim bindings

Updated the vim bindings to enable open recent, goto definition and jump mode.

April 09, 2024

Recent files tweaks

Added lots of QOL tweaks to the recent files handling. The recent files list is now updated by most recently used and the last file line column stored and restored on file switch. This means switching back and forth between two (or more) files is as quick as double tapping Ctrl-e.

April 09, 2024

Mouse goto definition

Added cross file location history today and also cleaned up the location history tracking logic a lot. This, in combination with goto defintion, makes source navigation nice and slick. Also added mouse bindings for goto_definition (alt-leftclick) and jump_back/forward (button8/button9) so you can browse source comfortably with just the mouse.

April 08, 2024

Traces

Mostly bug fixing today. Goto definition should be stable now. Also added a cli option to write traces to a file (~/.cache/flow/trace.log) so you don’t have to use tracy to see what is going on inside flow. Add it multiple times (up to five) to get overloaded with detail. Next up will be cross file location history and then after that I’ll probably start work on completion.

April 05, 2024

LSP goto definition

Today I got the first language server use case working. Goto definition works, at least for zls and clangd! Lot’s of issues still to fix, e.g. there is no cross file location history support yet, so navigating back from a goto def is a bit of a pain. Probably more than a couple bugs too. But hey, it still feels like a big step forward! 😃🍾

April 04, 2024

More LSP progress

More work on LSP today. Got my first valid response from clangd to a textDocument/definition request! Unfortunately zls is still giving me InvalidRequest responses, even though my request is identical to the one sent by vscode. 🤷

April 01, 2024

Modifer state tracking

Added modifier state tracking today, along with a few other minor bug fixes. Modifier state, used for ctrl-click, fast scroll and few other features, can no longer get stuck if your terminal drops key events. This could happen previously on focus change. Now the modifier state will automatically re-sync when you switch back to the terminal running flow.

March 31, 2024

More multi-cursor and some LSP

Added two minor multi-cursor commands today. Add cursors to all matches (Ctrl-Shift-l) and Add cursors to line ends (Shift-Alt-i). More for completness than anything else. I don’t really use these myself.

Also, I continued working on LSP support. Started work on goto defintion via LSP. Still lot’s to do though before LSP is usable.

March 28, 2024

Open recent file search box

Today I finished the basic functionality of the open recent file search box.

There are still a few important details to add, like sorting the list by persisted MRU for example.

March 20, 2024

Bracketed paste

Today I’ve added support for bracketed paste. This means that pasting into the editor with your terminal’s paste function instead of flow’s own paste keybind should work just as well as flow’s native paste command. No more endless undo steps because you pasted with the wrong keybind and no more annoying auto-indent reformatting of pastes. This is especially nice if you often paste from a clipboard manager application like I do.

March 12, 2024

Cursor collapsing

Today I added cursor collapsing. Now cursors are removed if they end up pointing to the same location as another cursor after a move operation.

March 11, 2024

Multi cursor copy & paste

Today I finally added the finishing touches on multi-cursor support. Cut, copy & paste! Multi-cursor is now complete.

March 06, 2024

Widgets

I did some work on widgets today. Prep work for things like completion menus and command palette. The menu on the home screen is now composed out of widgets that support mouse interaction, instead of just a bunch of text printed to the plane.

About this Devlog

I try to keep a log of major (and some minor) changes and new features going into flow as I work on them.

You can subscribe to this page via RSS and find more devlog entries in the archive.