Rbatis-X - VSCode Extension
Jul 20, 2025
A VSCode extension for working with rbatis mapper files: https://github.com/brequet/rbatis-x
I wanted to try building a VSCode extension and needed better tooling for rbatis (a Rust ORM). This project was mostly an experiment to see how to build a VSCode extension. It’s functional but not super polished - I vibecoded most of it to see what was possible.
Try it
Available on the VSCode Marketplace: Rbatis-X
What it does
The extension improves the developer experience when working with rbatis XML mapper files:
Syntax Highlighting - Layered highlighting for rbatis mapper files covering standard XML, embedded SQL keywords, rbatis-specific tags like <if> and <include>, and placeholder syntax like #{id}.
Auto File Detection - Detects .html and .xml files containing the rbatis DTD and assigns the correct language mode with a custom icon.
SQL Formatting - Format SQL code inside mapper tags (<select>, <insert>, <update>, <delete>, <sql>) with a configurable dialect.
Code Navigation - Jump from Rust functions with #[html_sql(...)] attributes to the corresponding mapper tag. Navigate back from XML to Rust. Jump from <include refid="..." /> to the defining <sql id="..." /> tag.
Status
This is an alpha release. The core features kinda work for my use case, but there are probably edge cases I haven’t hit. The indexer runs on startup and watches for changes, though it might take a moment on larger projects.
The extension does what I need it to do, and if it helps someone else working with rbatis, that’s a bonus.