-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: prettify symbols mode #2402
Comments
@siegebell the January update will support for font ligatures, this might help for your scenario, please give it a try. |
@egamma: font ligatures won't really help me. Use case: The Coq Proof Assistant allows one to write proofs about mathematics (category theory, real numbers, etc.), program behavior, program logics, type systems, etc. I am writing an extension to work with Coq proofs in vscode. It would be useful for the user to be able to define a set of symbol substitutions particular to the domain that they are writing proofs about. For example, set notation is useful for visualizing proofs about set theory. #192 demonstrates that symbols are also useful for general programming. Limitations of ligatures for symbol substitutions:
Solution:
|
@siegebell no doubt prettify symbols is more powerful than ligatures. Thanks for the clarifications. |
@egamma @aeschli - I've managed to implement a rudimentary prettify symbols mode using #7181 (before & after decorations) -- thanks! But there are a couple bugs in #7181 and limitations elsewhere that need to be addressed, so I'll be filing a few more related issues soon. |
Most of the features can be implemented as an extension, but here are a couple reasons it might be better to implement this in vscode itself:
But my preference would be to have a supported way to hide text (e.g. through decorations) that handles cursor movement and cursor visibility properly, and then leave the rest to an extension. |
👍 on implementing this in the core. Sounds like something the ViewModel should do -- it has the ability to transform view <-> model positions and randomly insert/remove text, etc.
|
@alexandrudima @aeschli this could also be resolved by #3422 if it gives extensions a flexible API to control code folding. The API would need to allow specifying:
|
@alexandrudima If I were to attempt a PR to support hiding text, do you think adding it as a decoration property would be a good idea? E.g. add |
This feature could in theory satisfy both Allow Unicode Operators and Remove Fun Keyword. Really hoping this feature gets implemented at some point. |
+1 |
To keep the number of issues in our inbox at a manageable level, we're closing issues that have been on the backlog for a long time but haven't gained traction: we look at the number of votes the issue has received and the number of duplicate issues filed. Thank you for your time and understanding. P.S. If you disagree and feel that this issue is crucial: we're happy to listen and to reconsider. |
Feature request: Emacs has a cool feature called "prettify symbols mode," demonstrated for Haskell here. This could also subsume #192.
The basic idea is to register a sequence of characters whose glyphs will be replaced with another glyph, but the original characters still appear in the text document. Ideally, the substitutions would be dependent on the context returned by a syntax highlighter or some other parser.
The text was updated successfully, but these errors were encountered: