CoenraadS / vscode-Disable-Ligatures

VSCode extension to disable ligatures at the cursor position, or disable all ligatures on the line
https://marketplace.visualstudio.com/items?itemName=CoenraadS.disableligatures
MIT License
22 stars 2 forks source link

Option to disable specific ligatures globally #2

Open archetyped opened 6 years ago

archetyped commented 6 years ago

Many ligatures are useful, but some can be difficult to differentiate at a glance in certain fonts, resulting in more time spent evaluating code. As such, I would love the option to disable specific ligatures for the entire editor view (i.e. not at just the selected line or cursor position).

Example:

"disableLigatures.ligatures.global": [
  "==",
  "===",
  "!=",
  "!==",
]

Thanks!

CoenraadS commented 6 years ago

Doesn't "editor.fontLigatures": false already do that?

archetyped commented 6 years ago

"editor.fontLigatures": false disables support for all ligatures. It does not allow you to specify specific ligatures to disable globally as per the example in my original post.

CoenraadS commented 6 years ago

ah I understand now

kennethreitz commented 6 years ago

+1000 for this!

affenwiesel commented 5 years ago

In fact thats the functionality I expected from this extension in the first place. Deactivating ligatures on cursor position is nice to have but deactivating specific ligatures in general is what I was actually searching for. The feature would be very much appreciated :)

jonathantneal commented 5 years ago

I wanted to this too! I’ve made a pull request to add this functionality. Perhaps someone could help by reviewing the changes and easing @CoenraadS’s time?

https://github.com/CoenraadS/vscode-Disable-Ligatures/pull/3

mattbeiswenger commented 4 years ago

@CoenraadS Any intention on merging this PR or is this repo abandoned?

CoenraadS commented 4 years ago

I will take a look at it tonight. Thanks.

I had all my notifications muted as I got a job and left my open source projects aside for a while :)

cgbeutler commented 4 years ago

Ligatures are natively supported. I requested the feature on VSCode itself. UP-VOTES NEEDED to make it happen. https://github.com/microsoft/vscode/issues/98758

mparsakia commented 3 years ago

Agreed, ligature for '===' can look really bad on some of my displays, I would like to be able to disable it.

cgbeutler commented 3 years ago

@mparsakia Yeah, sadly it didn't get enough upvotes in time. Apparently we are too few. There may be a way to write a plugin for this? Scan for ligatures and undo them? Don't know.

mparsakia commented 3 years ago

@cgbeutler Wow, I just realized this is actually the repo of the extension that does this; search in VSCode for "Disable Ligatures" by CoenraadS, then go to your 'settings.json' and you can set "disableLigatures.ligatures": ["===", ...] for each type of ligature you would like to disable. It seems like it will disable it everywhere except the settings.json file for now, but I may need to restart.

cgbeutler commented 3 years ago

@mparsakia Thought I tried that feature and it didn't work. Maybe I didn't restart....

cgbeutler commented 3 years ago

As a side note, if you are using FiraCode-based fonts, you can sometimes give it optional font ligature settings found here: https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets

Unfortunately, those settings are not share by all ligature fonts.

ilyagr commented 2 years ago

@cgbeutler Wow, I just realized this is actually the repo of the extension that does this; search in VSCode for "Disable Ligatures" by CoenraadS, then go to your 'settings.json' and you can set "disableLigatures.ligatures": ["===", ...] for each type of ligature you would like to disable. It seems like it will disable it everywhere except the settings.json file for now, but I may need to restart.

I think that setting has a misleading name, and it doesn't do what I hoped it would. For me, it only applies under the cursor (or over the line the cursor is on, depending on the value of disableLigatures.mode). Ligatures not in disableLigatures.ligatures remain enabled even when the cursor is over them.

alfonsusac commented 1 year ago

The "disableLigatures.ligatures": ["===", ...] does nothing on my workspace, even after restarting :/