For Vim, upon further investigation and git blaming, ghostty originally used the "ghostty" terminfo name, before those commits changed it to "xterm-ghostty" to try to "fix" key protocols:
----------------------------
config: default TERM to xterm-ghostty
Default the TERM value to "xterm-ghostty" to prevent breaking vim.
Consider changing back to ghostty in the future
terminfo: use 'xterm-ghostty' as primary name
Use "xterm-ghostty" as the primary terminfo name. This is a hack on a
hack...we use "xterm-ghostty" to prevent vim from breaking, and when we
do this as the default we break tcell-based applications (lazygit, aerc,
etc). tcell has a bug where the primary terminfo name must be the
value of TERM. gdamore/tcell#639 fixes the issue
but is not merged yet.
Fixes: 779186a ("config: add term config option")
----------------------------
As for vttest, I will also take a look at testing ghostty, but electricity problems and other factors prevent me from doing so.
On Fri, Dec 27, 2024 at 01:00:34PM -0600, G. Branden Robinson wrote:
> At 2024-12-27T15:57:40+0300, Aptivi CEO wrote:
> > A new terminal emulator has just surfaced: ghostty. You can find its
> > website here: https://ghostty.org. I've managed to obtain the compiled
> > xterm-ghostty terminfo file here.
>
> Given that this project is independent of xterm, why would the database
> entry be named "xterm-ghostty" and not simply "ghostty"?
The developers did that to fool vim into believing it's a variant of xterm:
/// This will be used to set the `TERM` environment variable.
/// HACK: We set this with an `xterm` prefix because vim uses that to enable key
/// protocols (specifically this will enable `modifyOtherKeys`), among other
/// features. An option exists in vim to modify this: `:set
/// keyprotocol=ghostty:kitty`, however a bug in the implementation prevents it
/// from working properly. https://github.com/vim/vim/pull/13211 fixes this.
term: []const u8 = "xterm-ghostty",
however, that was addressed over a year ago, and it's unlikely that there are
any users of vim who both care about the feature and will use ghostty.
grep'ing through the source code shows me a lot of other things to dispute.
(I took a quick try at vttest on arch, but ghostty hung - spits out a lot
of error messages - ymmv)
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net