Skip to content
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

Improve highlighting #55

Closed
sigmaSd opened this issue Oct 6, 2019 · 2 comments
Closed

Improve highlighting #55

sigmaSd opened this issue Oct 6, 2019 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@sigmaSd
Copy link
Owner

sigmaSd commented Oct 6, 2019

Currently highlighting works pretty well, but one issue remains if we paste code into the repl it becomes noticeably laggy, I'm not sure whats the best way to deal with it

1 - we can de-bounce from highlighting calls, that is if the user input very fast(like pasting) write all the input without highlighting and then highlight when the input finishes

2 - Investigate how editors (exp: accepted) that use syntect do it, I'm only using the easy module, there is probably a more correct way to highlight text

@sigmaSd sigmaSd added enhancement New feature or request help wanted Extra attention is needed labels Oct 6, 2019
@sigmaSd sigmaSd changed the title Improve highliting Improve highlighting Oct 6, 2019
@sigmaSd
Copy link
Owner Author

sigmaSd commented Oct 6, 2019

1- is actually possible see https://github.com/sigmaSd/IRust/tree/async_highlight but crossterm async story is not good for now, (its a busy loop that will consume a lot of the cpu), maybe revisit this after its reworked upstream, or figure how to handle it correctly with the current implementation

@sigmaSd
Copy link
Owner Author

sigmaSd commented Jul 13, 2020

Fixed in 0a0e9fc
tldr: Removed syntect, used a custom implemented parser

@sigmaSd sigmaSd closed this as completed Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant