$ account vhakulinen
GNvim is a GTK4-based Neovim GUI written in Rust. It communicates with Neovim via the MessagePack-RPC protocol, providing a native desktop experience with features like floating windows, popup menus, tabline, cmdline, and smooth animations for cursor and scrolling. The architecture is a single Rust binary split into a workspace: the main `ui` crate contains the GTK4 frontend with custom widgets (e.g., Grid, GridBuffer, Cursor, Fixedz, Popupmenu, Shell), and the `nvim-rs` library crate provides a reusable, async RPC client for Neovim with auto-generated API bindings. The system's entry point is `ui/src/main.rs`, which registers resources and launches the GTK application. Data flows bidirectionally: Neovim sends UI events (redraw, options, notifications) as RPC messages, which are deserialized into Rust types and applied to the GTK widget tree; user input (keyboard, mouse) is captured by GTK event controllers and sent back to Neovim as RPC calls. The codebase is well-structured, modular, and follows modern Rust async patterns, with extensive use of GTK4's property system and custom layout managers for complex UI composition.