Skip to content

Conversation

@FMorschel
Copy link
Contributor

Fixes #3628.

I'm not sure the recreateDecorationType is the right approach here but without it, I could not make the label update when changing the propriety on the settings.

Copy link
Member

@DanTup DanTup left a comment

Choose a reason for hiding this comment

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

Thanks! I've added some comments (mostly trivial).

Copy link
Member

@DanTup DanTup left a comment

Choose a reason for hiding this comment

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

Some very minor comments, but otherwise it's looking good - thanks! :)

Copy link
Member

@DanTup DanTup left a comment

Choose a reason for hiding this comment

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

Thanks, this lgtm - I'll pull it down and do a little testing when I get a min and if it's all good merge it in :-)

@DanTup
Copy link
Member

DanTup commented Sep 13, 2024

This LGTM, thanks!

I found a quirk while testing, but it's not a result of this PR - we have it today (but it's easier to notice now there are more settings you might be customising) - I've opened #5265 about that.

@DanTup DanTup merged commit 5b91bfa into Dart-Code:master Sep 13, 2024
@DanTup DanTup added this to the v3.98.0 milestone Sep 13, 2024
@DanTup DanTup added is enhancement in editor Relates to code editing or language features labels Sep 13, 2024
@Fernandomr88
Copy link

how to use dart.closingLabelsPrefix? couldn't find it in the release notes

@DanTup
Copy link
Member

DanTup commented Sep 30, 2024

@Fernandomr88 it's a VS Code setting that shows up in the user/workspace settings:

image

Or if you're using the JSON settings editor:

"dart.closingLabelsPrefix": " # ",

@stan-at-work
Copy link

Why not also let us change the color, fontSize and suffix ?

Maybe something like thise:

// ${className} //

@DanTup
Copy link
Member

DanTup commented Oct 1, 2024

@stan-at-work you can already change the colour (using dart.closingLabels in workbench.colorCustomizations). I don't think we can alter the size (the settings we can set are at https://code.visualstudio.com/api/references/vscode-api#ThemableDecorationAttachmentRenderOptions), and there's no reason we couldn't support a suffix, it just hasn't been requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in editor Relates to code editing or language features is enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow customisation of closing label prefix and font/size

4 participants