Created
December 23, 2021 10:10
-
-
Save scarf005/a07fdee48ebf53b6837cd4ee2ae2ef17 to your computer and use it in GitHub Desktop.
prettify python lambda into javascript style arrow function. does not changes actual symbol.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"symbolMasks.masks": [ | |
{ | |
"language": "python", | |
"patterns": [ | |
{ | |
"pattern": "(lambda)|(?<=lambda).?\\s?|(?<=lambda[^:]*):", | |
"replace": { | |
"lambda": { "text": "λ" }, | |
": ": { "text": "() => " }, | |
" ": { "text": "(" }, | |
":": { "text": ") =>" } | |
} | |
} | |
] | |
} | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment