rosshamish / kuskus

The extension pack so nice they named it twice
https://marketplace.visualstudio.com/items?itemName=rosshamish.kuskus-extensions-pack
44 stars 11 forks source link

feat: support markdown syntax highlighting #112

Closed Caleb-Wishart closed 1 year ago

Caleb-Wishart commented 1 year ago

Add's support for kusto syntax highlighting in markdown fenced code blocks

Valid language names are kusto and kql

image

Note that the syntax highlighting does NOT work in the preview editor.
Tried looking into this but no luck.

Caleb-Wishart commented 1 year ago

Haven't updated version number in code as I see there is an action for that

Caleb-Wishart commented 1 year ago

Also added an icon for kusto language.
Dark mode variant has higher contrast.

Light mode:
image

Dark Mode:
image

Change language mode example: image

rosshamish commented 1 year ago

Super. Always glad to see a contribution.

The code fence feature is great. I'll take a look at the diff in a bit.

About the icon, I have a feeling there might some kind of IP law or trademark issue with including it. Does it show up just in the language picker for a file? Where did you get the icon from, and do you know if it's fair use here?

Caleb-Wishart commented 1 year ago

I did think about IP issues. Had just noticed no icon associated while in package.json.

The light mode one was already in the extension files. It was hard to see in dark mode so I just did a colour shift to the original. Any IP issues would be tied to wherever the original is from.

I normally use vs-icons which has kusto set as the icon for Azure data explorer anyway. Can revert that commit if needed, was just another easy win.

rosshamish commented 1 year ago

Gotcha, OK then, I think the icons should be fine. Happy to merge pending the one comment about csl as another code fence name/extension. Appreciate the contribution, feel free to look around in https://github.com/rosshamish/kuskus/issues or submit other PRs for other pet peeves / desired features.

That github action you saw will version bump and release the extension as soon as this merges, so you should have it available right away.

Caleb-Wishart commented 1 year ago

I did look at adding csl but decided against initially as its a depreciated name. Don't mind adding it though.

I'll take a look. I know the comment issue no longer applies as it works on my end. May look at others but honestly not well versed in these kinds of grammar issues. The syntax highlighting in markdown notes was my main reason as I wanted it for notes.

rosshamish commented 1 year ago

I know of at least one codebase that stores them as .csl and probably still thinks of them as "csl files", so for their sake I'd appreciate it.

And sounds good! No pressure, just communicating that I'm vaguely around to review and shepherd releases.

Caleb-Wishart commented 1 year ago

And sounds good! No pressure, just communicating that I'm vaguely around to review and shepherd releases.

Appreciate it, I've worked on another project that didn't have that support so it's always nice to have someone able to look over it

rosshamish commented 1 year ago

Released as v1.2.0 in the extension store. https://marketplace.visualstudio.com/items?itemName=rosshamish.kuskus-kusto-syntax-highlighting