microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.52k stars 28.1k forks source link

Support ligatures in terminal #34103

Open Tyriar opened 6 years ago

Tyriar commented 6 years ago

Regresses with performance improvements in terminal's renderer https://github.com/Microsoft/vscode/pull/33954

Mohamed3on commented 6 years ago

Hi! is there any timeline for this feature?

Tyriar commented 6 years ago

Nope.

Here's the upstream issue https://github.com/sourcelair/xterm.js/issues/958

coreh commented 6 years ago

Would be really nice if there was a setting to re-enable the old terminal rendering until all the issues with the new terminal are resolved (blurriness, ligatures, emoji). 😕

MPV commented 5 years ago

It seems there is now an xterm.js plugin for ligatures support: https://github.com/xtermjs/xterm-addon-ligatures

How can we get it into vscode?

Tyriar commented 5 years ago

@MPV it would have to be built into the core, the main thing that needs to happen now is to evaluate how much weight the addon would add to the VS Code distributable.

cziem commented 5 years ago

font-ligatures

This is how my vscode term looks like, I want it to look like this:

font-ligatures-2

Tyriar commented 5 years ago

@phavor I don't think your issue is about ligatures but rather your powerlines setup https://code.visualstudio.com/docs/editor/integrated-terminal#_can-i-use-powerline-fonts-in-the-integrated-terminal

cziem commented 5 years ago

@Tyriar I fixed though. Thanks. This line did the job "terminal.integrated.fontFamily": "'Fira Code iScript'"

FelikZ commented 4 years ago

any news on it? I believe this is the last thing is missing for terminal to render everything proper

wolf99 commented 4 years ago

Just tried Cascadia Code font in the integrated terminal... ligatures not present 😢

jhpratt commented 4 years ago

I see that there's a way to do this via an extension that modifies VS Code's internal files. Would it be possible to add a checkbox in settings that toggles this itself? @Tyriar

Tyriar commented 4 years ago

@jhpratt that's what it would do eventually, the remaining work here is slimming down the ligatures xterm.js addon to bare essentials and test/include it. I don't have time to do it right now due to other priorities though.

Geobert commented 4 years ago

Is this bug why I got this in vscode: image

instead of: image

(using this font https://github.com/adam7/delugia-code)?

Tyriar commented 4 years ago

@Geobert probably caused by https://github.com/xtermjs/xterm.js/issues/1709 or https://github.com/xtermjs/xterm.js/issues/942, ligatures are different to emoji.

Tyriar commented 4 years ago

Got a bunch of questions about ligatures when tweeting about the WebGL renderer so I'll give an update here. Here's the remaining work to do on this:

d-cas commented 4 years ago

Apologies if this comment is not appropriately placed as I'm new to github and dev in general.

So it's my understanding that ligatures in the integrated terminal are disabled until other problems are fixed? Thanks and good day!

Tyriar commented 4 years ago

@threedogs1 yep, the first step above is happening in https://github.com/xtermjs/xterm.js/pull/2847

regisbsb commented 3 years ago

Looks like this has been merged? https://github.com/xtermjs/xterm.js/pull/2847

regisbsb commented 3 years ago

https://github.com/xtermjs/xterm.js/issues/958

regisbsb commented 3 years ago

This should help https://github.com/vercel/hyper/issues/3607

Tyriar commented 3 years ago

@regisbsb there are additional challenges for vscode, we would likely have to break the support once again soon as we're working towards turning off node in the renderer which the addon depends on.

regisbsb commented 3 years ago

@Tyriar I was really interest to see if it made to hyper tbh but vscode would be nice enough

codemaster138 commented 3 years ago

Any progress on this? The Terminal still doesn't seem to support ligatures...

Arelav commented 3 years ago

Any progress on this? The Terminal still doesn't seem to support ligatures...

This open source. You can always create PR if it's so urgent for you.

Tyriar commented 3 years ago

Here's what this issue is blocked on FYI https://github.com/xtermjs/xterm.js/issues/958#issuecomment-623114150

Pyrolistical commented 3 years ago

so this was released 2 months ago https://www.npmjs.com/package/xterm-addon-ligatures

does it just need integrated?

Tyriar commented 3 years ago

@Pyrolistical see https://github.com/microsoft/vscode/issues/34103#issuecomment-561851965

zzstoatzz commented 2 years ago

@zzstoatzz I'm sorry, but I don't quite understand your post. Where in the image are ligatures demonstrated?

oof, sincere apologies, I've deleted my comment since I realized I had misunderstood ligatures to be special characters as opposed to specific combinations of special characters

Tyriar commented 2 years ago

Blocker:

ToxicSmurf commented 2 years ago

Around 2023 then?

Tyriar commented 2 years ago

I tried recently to integrate this but ran into some electron related problems including a segfault on macos, so this got pushed. See https://github.com/microsoft/vscode/pull/139537

Tyriar commented 1 year ago

PR to enable ligatures with an experimental setting: https://github.com/microsoft/vscode/pull/157008

remidebette commented 1 year ago

Hi, So is this expected to be done?

meganrogge commented 1 year ago

@remidebette not yet, but soon

johanohly commented 1 year ago

So can I enable the experiment or is it not even an experiment yet?

krischal111 commented 1 year ago

I want ligatures on my terminal, even if it's hacky. How hard would it be?

bnb commented 1 year ago

Would love to see this. Specifically, I'm using Twilio Sans Mono and would like the (::) ligature to work when I run npx bitandbang :)

Tyriar commented 1 year ago

This is still blocked on https://github.com/microsoft/vscode/pull/157008#issuecomment-1206848384. If anyone wants to help investigate that would be helpful, otherwise since this is pretty low priority against my other tasks it's up to whether I feel the motivation in my free time.

junaga commented 10 months ago

just rewrite the terminal service If it's not feasible. couldn't you use the chromium terminal emulator? does that support ligatures? I know it supports all escape sequences including color. are ligatures not part of ecma-48 ?

if the above is true, again, implement another terminal emulator, the ship of theseus style. Windows Terminal is OSS no? do a Windows Terminal extension, that simply mounts the child process in the IDE, stdout/stdin it.

why is this feature taking several years what am I missing? if VS Code codebase is such a mess I might consider switching my editor, this is unbelievable.

Arelav commented 10 months ago

why is this feature taking several years what am I missing?

Yes, you are completely missing the fact it's an open source. Go and implement yourself if it's so urgent for you.

junaga commented 10 months ago

Claiming that VS Code is "open source" is childish and unreasonable. This is a Microsoft product.

junaga commented 10 months ago

This is, open source, this Ë…, isn't image

I don't care but stop pretending the codebase has any excuse to be rotting, Microsoft has enough cash and engineers, it's just bad management, not "open source".

Tyriar commented 10 months ago

@junaga a few things:

junaga commented 10 months ago

Windows Terminal

I was not aware Windows Terminal only runs on Windows, my apologies. wt being a new product, with the fancy trailer and all, I thought it was linux, macos and freebsd too. I still think it a wt extension would have been worth a shot otherwise.

open source

VS Code is, in any meaningful interpretation of the word "open source", not an open source community project, but a company-owned, brand, designed and tested. I know closed-source projects that are more open than the VS Code app. Publicly readable source code is of little use if everyone pulls your build with closed-source DRM and trackers. Also, there are no other providers to sign in and settings sync. My guess is ~80% of users don't know other builds exist, or they simply don't trust them (fear of scam). a gap in subject knowledge is the oldest excuse in the book of exploitation. The whole point of the term "open source" was freedom, for our half of the world, the blue internet. But I wouldn't expect an $MSFT employee to understand that.

again, I don't care,

bad management

but hiding behind an "open source" shield is not respectable. you are employed and literally paid to write this code. I understand that ligatures are not as much a priority, as the fancy GitHub copilot chat, which is why I might just switch to Google IDX, they have ligatures on their homepage.

have a nice day @Tyriar

Tyriar commented 10 months ago

@junaga btw Google IDX is a fork of VS Code so it wouldn't have ligatures in the terminal either

junaga commented 10 months ago

god damn it, nvm then

junaga commented 10 months ago

but you see the issue, right? this is what MIT enables.

Tyriar commented 10 months ago

I'm not understanding your point. It's open source so people can fork it, which is a good thing? Google may also end up contributing upstream, improving VS Code and all its forks.

Yes VS Code is "built on OSS", not open source itself. It follows a very similar pattern to Chromium and Chrome. I'm pretty sure VS Code would not exist if there was not a private fork as MS needs to protect its trademarks. It seems like a net benefit to me that VS Code, this OSS project and all its forks exists.

You can argue forever about free software/copyleft vs open source, but that's not going to change the license of the repo or anything.

junaga commented 10 months ago

My point was that, for MIT projects, it doesn't matter if a new fork is better or not.

junaga commented 10 months ago

https://hackaday.com/2023/08/23/linux-fu-the-old-school-terminal/