-
-
Save renatorib/a0d7af29133c8a775b0740d0b67e32a8 to your computer and use it in GitHub Desktop.
| atom-text-editor { | |
| text-rendering: optimizeLegibility; | |
| font-family: "Operator Mono"; | |
| font-weight: 400; | |
| line-height: 1.7; | |
| } | |
| atom-pane atom-text-editor { | |
| margin-top: 10px; | |
| margin-bottom: 10px; | |
| padding: 0; | |
| } | |
| atom-text-editor::shadow { | |
| .storage.type.function.arrow, | |
| .keyword.operator, | |
| .meta.brace { | |
| font-family: "Fira Code"; | |
| } | |
| .string.quoted, | |
| .string.regexp { | |
| -webkit-font-feature-settings: "liga" off, "calt" off; | |
| } | |
| } |
Great tweaks!!
This is great! Mind if I ask what syntax theme you're using in that screenshot?
@p-miller Currently I use One Dark theme syntax. I think it's in atom core themes.
@ambethia mind sharing that tweak? I'd love to have that too!
@ambethia @nicholasodo Yeah, I'd love to see your LESS file!
Gist updated!
Added> 1.13.x version (no shadow and new classes)
Does not apply entirely to files using some specific languages like "JavaScript with JSX" subtleGradient/language-javascript-jsx#26
@n1ko The classes vary according to each syntax packages. Need to see case by case.
If you can help us, you can open devtools in your atom and check the classes of not-applied ligature and comment here, then I'll check
Thanks!
@renatorib Could you please help me disable ligatures on current line?
I tried this but it seems doesn't work with Atom 1.18 anymore
atom-text-editor::shadow .lines .cursor-line .keyword.operator {
text-rendering: auto;
}
Thank you!
Hasklig also works nice with this. Thanks!
I created a project that will add ligatures directly to the Operator Mono font. https://github.com/kiliman/operator-mono-lig
Nice work @renatorib!
I had some problems with the round and curly brackets (the CSS selector .syntax--punctuation.syntax--definition was matching more than it was necessary).
I also applied italic to some tokens (like import, export, from, class, return and so on).
It works with the syntax JavaScript (JSX) available in the React atom package.
My styles.less file now looks like this:
https://gist.github.com/helton/24b652bda30dcaa83660cfacb75a2797
Note
I don't use Atom anymore - I migrated to vscode
Because of that I will not know or be able to fix bugs or maintain future breaking changes versions of Atom.
But if anyone wants to help, comment here what/why/how to fix then I edit this gist.
Thanks!
Great project @kiliman!
how to you achieve the same in vscode ? @renatorib
Could you tell us how you do that on vscode please @renatorib @orenmizr
Hi guys,
I switched from VSCode to Atom recently and the tweak for having ligatures of Fira Code and Operator Mono for fonts is the following.
First download this package https://github.com/be5invis/vscode-custom-css
Then you create a basic css file somewhere on your computer, copy paste this snippet
.mtk5, .mtk8, .mtki, .mtk10 {
font-family: 'Operator Mono';
font-size: 16px;
font-weight: normal;
font-style: italic;
}Then you'll have to go into VSCode settings panel and point to the newly created CSS file.
After that, open the command palette and just activate vscode-custom-css.
This should be the best way to do it.
WARN : Maybe Code will tell you that your Code version is broken, just don't care, it's because of vscode-custom package.
@Phavor
Open Atom's stylesheet in Atom > Stylesheet..
Modify the sections to look like the following, the spans are the important part. You can find these class names by browsing through the editor in syntax of your choice using the developer tools (Option+Cmd+I).
`atom-text-editor.editor {
.syntax--storage.syntax--type.syntax--function.syntax--arrow,
.syntax--keyword.syntax--operator:not(.accessor),
.syntax--keyword.syntax--type,
.syntax--punctuation.syntax--definition {
font-family: "Fira Code";
}
span.syntax--keyword.syntax--control,
span.syntax--storage.syntax--type,
span.syntax--storage.syntax--modifier {
font-family: "Operator Mono";
font-style: italic;
}
`
You are my hero. I hadn't even thought to do this. I use Operator Mono, and sorely miss my ligatures from Fira Code. Thank you so much! I already have a lot of tweaks in my CSS to user OM's script italics for more than just comments. Perfect addition.
![]()
What syntax theme and TextMate rules are you using? It's look nice. Thanks.

Operator Mono: http://www.typography.com/blog/introducing-operator ($100)
Fira Code: https://github.com/tonsky/FiraCode (Free)