Another data structure that you can consider is the red green tree: https://willspeak.me/2021/11/24/red-green-syntax-trees-an-overview.html
We use it in Biome too, and it’s great for building trees that are immutable and yet still need frequent updates, as well as traversal in all directions. Its implementation contains quite a bit of unsafe
to make it fast, though as a consumer you’re not really exposed to that.
Ha, I better not tell you about the Apple Keyboard I use with my Linux laptop then. Don’t like macOS much, but I love their flat keyboards.