feat: add inlay hints to show cycle timings next to code #145
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.
Add the functionality to show the cycle count of each assembly instruction inline with the code. Example of turning this on and off:
![Inlay Hints](https://private-user-images.githubusercontent.com/4892984/397995780-85fe9177-2404-4359-b008-4a2df2ea88db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzM3MjEsIm5iZiI6MTczOTM3MzQyMSwicGF0aCI6Ii80ODkyOTg0LzM5Nzk5NTc4MC04NWZlOTE3Ny0yNDA0LTQzNTktYjAwOC00YTJkZjJlYTg4ZGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTUxNzAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDIzZTMyNjkwOTdiODMxMTQ0NTQ1MWM4NzQxOGZiN2E1MzA5YTNhNWIxMWQ0ZjBhMTdhZDZiNDgzNTUwMjA0NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.93XpT68n0f9EL4trgcCax0__kqha6C4mQgAlud-usNE)
Since this could be distracting, the feature is off by default. It must be enabled by including a beebvsc.enableInlayHints setting in the settings.json file:
![InlayHintsSettings](https://private-user-images.githubusercontent.com/4892984/397995781-f021853e-e8fc-4e46-a713-bc64c87d6c9f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzM3MjEsIm5iZiI6MTczOTM3MzQyMSwicGF0aCI6Ii80ODkyOTg0LzM5Nzk5NTc4MS1mMDIxODUzZS1lOGZjLTRlNDYtYTcxMy1iYzY0Yzg3ZDZjOWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTUxNzAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzdhZGQyNDFkYWVhMDcxOWRhMzM5YmJhZDUwYzIzYWI4YjlmNWRhNmYzMmFmZDIyMWJiN2IzZDk2MWEwY2FiNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.jk9YS_ARYCEvgjtrV06c86nUDw6Q_y7ngti_ZWfaGZY)
The editor has its own setting with values "on", "off", "onUnlessPressed" and "offUnlessPressed". This is a very nice companion as the hints can be off unless the user is holding down ctrl+option (or ctrl+alt).
Closes #142