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

Option to show solution after completing an exercise. #2064

Closed
KotUW opened this issue Aug 3, 2024 · 3 comments
Closed

Option to show solution after completing an exercise. #2064

KotUW opened this issue Aug 3, 2024 · 3 comments

Comments

@KotUW
Copy link

KotUW commented Aug 3, 2024

Is it OK, to add an option to show solution after completing an exercise.
I will be interested in implementing it. If acceptable.

@mo8it
Copy link
Contributor

mo8it commented Aug 3, 2024

You mean show it in the terminal instead of just showing the path as a link?

I am not sure if I like that option, especially because of long files. Maybe in a pager?

@KotUW
Copy link
Author

KotUW commented Aug 16, 2024

Pager works

@mo8it
Copy link
Contributor

mo8it commented Aug 20, 2024

I considered this feature, but unfortunately, it would mean adding a huge library like syntect for syntax highlighting. It also hides the advantages of having a language server for reading the docs of used items in the solution. "Go to definition" is also very useful if someone wants to take a deeper look at how an std function works.

That being said, I tried to highlight the solution in e7ba88f. Note that the shown path to the solution file is a terminal link. So you can click on it to open the solution file in your favorite editor :)

@mo8it mo8it closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants