Skip to content

Comments

Add code evaluation settings for blink and post evaluate message#13

Open
okhick wants to merge 6 commits intoscztt:developfrom
okhick:evaluation-decorator-tweaks
Open

Add code evaluation settings for blink and post evaluate message#13
okhick wants to merge 6 commits intoscztt:developfrom
okhick:evaluation-decorator-tweaks

Conversation

@okhick
Copy link
Contributor

@okhick okhick commented Mar 25, 2023

The evaluation background decorator had a bug where instead of applying the timeout value, it just flashed. I also shortened the timeout to 600ms, which I think is the SCIDE default. This timeout value could probably be a setting someday.


return (text: string, isError: boolean) => {
if (evaluateCount == currentEvaluateCount)
if (evaluateCount != currentEvaluateCount)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this is a copy/paste error from line 80.

@okhick okhick changed the title Tweak decorator timeout and clear Add code evaluation settings for blink and post evaluate message Apr 10, 2023
@okhick
Copy link
Contributor Author

okhick commented Apr 10, 2023

Reworked it a little. This PR now includes the following:

  • I'm not the most familiar with the style of code formatting. I added an extension to format on save (xaver.clang-format). I'm happy to remove it's not helpful to anyone else. This did clean up a bit of things, however.
  • Extension settings and implementation for blinkDuration and showMessage

This is accomplished by setting codeEvaluationSettings in SuperColliderContext and then passing the context to evaluateString. This pattern should make it easy to inject more settings if we need to.

Comment on lines -231 to +233
interface EvaluateSelectionOptions extends WorkDoneProgressOptions {
}
type EvaluateSelectionOptions = WorkDoneProgressOptions;

interface EvaluateSelectionRegistrationOptions extends EvaluateSelectionOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
}
type EvaluateSelectionRegistrationOptions = EvaluateSelectionOptions&TextDocumentRegistrationOptions&StaticRegistrationOptions;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These make more sense to me as types; not interfaces.

@scztt scztt force-pushed the develop branch 2 times, most recently from eec81a4 to 27e4aa2 Compare April 17, 2024 23:41
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

Successfully merging this pull request may close these issues.

1 participant