![]() This line of reasoning is not sensible, these kinds of fonts won't cease to exist, and it's not them to blame for not holding undercurls in an ideal form, they're actually fine as is because they were never designed with that in mind in the first place (many bitmap fonts aren't). Seems like it's just a crappy font without any descent space Undercurls is a decoration, it comes after the font per se, it's not a builtin aspect of it, so, I see as normal that many fonts aren't prepared for the myriad kinds of decorations that are possible in text authoring. This realization is what removed the initial qualms I had with the look I was getting with xfce4-terminal. Let me expand on this a little further as I didn't got no qualms about it out of an afterthought, I had actually reached some conclusion, which changed my mind to accept it: when people go about marking their own handwritten text, physical books, and even manuals printed with bitmap fonts, they, more often than not, handwrite undercurls that almost stick to the text. The appearance in xfce4-terminal is much less worse Note, the Terminus font I use has a personal fontconfig configuration. ![]() "/home/francisco/.config/alacritty/alacritty.yml" Curiously, the same setup, just changing to xfce4-terminal, look as expected (xfce4-terminal vs Alacritty):įont/Terminal size: Welcome to Alacritty So in the end, when our underlying terminal is * (anything, but you could be more specific and just narrow it down to alacritty, for example) and tmux receives a Smulx from Neovim, it will spit out something like E[4:2m, which the host terminal Alacritty understands and renders into an actual wobbly red (or orange, or blue, or whatever) line.The newly implemented undercurl doesn't look like undercurl at all on my setup. And as the application author I didn't need to write it to know the sequence that every terminal needs to see to make an undercurl. So you as the application writer could say, hey I need an undercurl so I'm asking for Smulx and any terminal that knows how to Smulx will then match on that and provide the relevant escape codes. You can read more about what terminfo is here, but my basic understanding is that it lets calling applications ask for the capability without needing to know exactly how each terminal has it implemented. And Smulx and Setulc are terminfo capability names. The last parts to understand here are terminal-overrides and what the heck are Smulx and Setulc? The terminal-overrides allow terminal descriptions read using terminfo to be overriden. You can see the \E[4 and \E[58 in there followed by sequences that allow tmux to interpolate incoming values to handle the escape sequences we just saw above. Set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%%&%d% m' # underscore colours - needs tmux-3.0 Set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support Set-option -gas terminal-overrides "*:RGB" # true color support Set-option -gas terminal-overrides "*:Tc" # true color support May need to update terminfo to recognize tmux-256color. # MacOS ships with a very old ncurses and terminfo. Older terminfo won't recognize tmux-256color, which Neovim prefers to work with. As noted in the comments, you'll need at least tmux 3.0 for colors, and you may need to update your terminfo if you're on MacOS or just generally have an older terminfo. Right up front without reading the rest, here's what you need. It worked in Alacritty but not when combined with tmux. The very next day I started a tmux session inside of Alacritty, opened Neovim, and was aghast to see that the diagnostics were once again a pedestrian regular underline and in the wrong color to boot. ![]() The LSP server sends diagnostic errors, which Neovim as the LSP client can mark with some sort of underline.The undercurl entered my life on that fateful day for a few reasons: A single tear rolled down my cheek at the sight of this thing that I later learned was called an undercurl. a little red squiggly line underneath a variable with a typo in the name. And it was going to be such a quick edit that I didn't bother to start a tmux session first. One day I popped open Alacritty to edit something quickly in Neovim.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |