Added minimal syntax highlighting#714
Closed
Ayush2006128 wants to merge 7 commits intomicrosoft:mainfrom
Closed
Conversation
…ctions for copilot
- Introduce exp_highlighting flag in State and DocumentManager - Propagate the flag to new documents when they are added - Add CLI option --enable-exp-highlighting and update help text
Author
|
It was a fascinating experience working on this project |
Member
|
Your implementation is a classic tokenizer. Unfortunately, we can't merge it because we would need flexible support for more languages. I'm super happy you liked experimenting on the project though! (FYI I'm also working on this right now: #624 (comment)) |
Author
|
@lhecker I was going to do the same, but wouldn’t that make it more complex and slow down the app? 🤔 Here’s a new solution: we could add language-specific highlighting only for languages like HTML, XML/XAML, YML/YAML, CSS/SCSS, and TOML. For other languages, we could have the tokenizer handle basic elements like booleans or simple keywords using LSPs. 🤷 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added simple tokenizer to implement basic syntax highlighting respecting the simplicity of the project
Features:
Note: Currently it only highlights basic things like numbers, identifier, strings, comments
//or#and symbols.This is an experimental feature provide
--enable-exp-highlightingflag to enable