VSCode-Bedrock-Development-Extension icon indicating copy to clipboard operation
VSCode-Bedrock-Development-Extension copied to clipboard

Feature/Request: Add in all the new format codes and remove underline and strikethrough as they don't work

Open Xterionix opened this issue 1 year ago • 16 comments

Would add this myself but after looking through the repo I couldn't figure out how it worked

Xterionix avatar Mar 27 '24 20:03 Xterionix

Which format codes and underlines?

DaanV2 avatar Mar 28 '24 10:03 DaanV2

https://minecraft.wiki/w/Formatting_codes

Xterionix avatar Mar 28 '24 13:03 Xterionix

The completion is in: https://github.com/Blockception/VSCode-Bedrock-Development-Extension/blob/f7926608cddba30bff5f053cab4c30430aa03494/server/src/Lib/Minecraft/Language/Completion.ts

The syntax for code formatting is in https://github.com/Blockception/VSCode-Bedrock-Development-Extension/blob/f7926608cddba30bff5f053cab4c30430aa03494/minecraft-mcfunctions/syntax.tmLanguage.json And https://github.com/Blockception/VSCode-Bedrock-Development-Extension/blob/f7926608cddba30bff5f053cab4c30430aa03494/minecraft-language-files/syntax.tmLanguage.json

DaanV2 avatar Mar 28 '24 18:03 DaanV2

I've seen those 3 files but I'm not sure how this image decides the color

Xterionix avatar Mar 28 '24 23:03 Xterionix

Thats cause you dont set the color 😬 Its all depended on the colour theme you use

DaanV2 avatar Mar 29 '24 09:03 DaanV2

Ah, is there some where I can preview the default theme colors without compiling and changing the values?

Xterionix avatar Mar 29 '24 09:03 Xterionix

No unfortnually not, you can use the client + server launch option in vscode debug to start a debugging sessions 🤔

DaanV2 avatar Mar 29 '24 13:03 DaanV2

What options go there exactly? Some of the options listed aren't in the schema

Xterionix avatar Mar 29 '24 19:03 Xterionix

Also is it relying on a color theme a choice or is it because of a lack of a better option? Personally think it'd be nice to have the in game colors show

Xterionix avatar Mar 29 '24 19:03 Xterionix

There is no way to force the colour, you always have to specify something, that a colour theme will force onto it

DaanV2 avatar Mar 30 '24 09:03 DaanV2

And "What options go there exactly? Some of the options listed aren't in the schema"

Xterionix avatar Mar 30 '24 09:03 Xterionix

True be told, anything.... Any plugin can just say, ooh yeah this piece of text is a "foo" And colour theme use a prefix matching pattern to assign colours to them

So: you can have resource.class.static.global but the colour theme might just specify resource.class Though other might be able to specify: resource.class.static, everything the schema gives is just what is taken as standard, but colours theme might just specify something else.

DaanV2 avatar Mar 30 '24 09:03 DaanV2

https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide

DaanV2 avatar Mar 30 '24 09:03 DaanV2

Couldn't the plugin then create its own colors that are based on the minecraft ones?

Xterionix avatar Mar 30 '24 09:03 Xterionix

Which means the plugin needs to make an entire colour theme, that everyone needs to use 😬

DaanV2 avatar Mar 30 '24 14:03 DaanV2

It's not possible to only add a few colors instead of an entire theme?

Xterionix avatar Mar 30 '24 17:03 Xterionix