This looks very similar to what I do in Emacs, using ghostel, which also has the advantage of using libghostty for excellent quality terminal rendering.