# VSCode extension for syntax highlighting discourse-plugin javascript

**URL:** https://meta.discourse.org/t/vscode-extension-for-syntax-highlighting-discourse-plugin-javascript/147051
**Category:** Development
**Created:** [April 6, 2020, 9:45pm UTC](https://meta.discourse.org/t/vscode-extension-for-syntax-highlighting-discourse-plugin-javascript/147051 "2020-04-06T21:45:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zcuric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zcuric/32/292837_2.png) [@zcuric](https://meta.discourse.org/u/zcuric)
#### Post date: [April 6, 2020, 9:45pm UTC](https://meta.discourse.org/t/vscode-extension-for-syntax-highlighting-discourse-plugin-javascript/147051/1 "2020-04-06T21:45:45Z")

</div>

Hi, I made VSCode extension for highlighting javascript in discourse plugin script tags

On Marketplace: [Discourse JS plugin syntax highlighting (HTML) - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=zcuric.vscode-discourse-plugin)

On Github: [GitHub - zcuric/vscode-discourse-plugin: VSCode extension for discourse plugin syntax highlighting · GitHub](https://github.com/zcuric/vscode-discourse-plugin) (⭐ if you like it)

As I said here [Developing Discourse Themes & Theme Components - #55](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648/55) my goal is to make a discourse plugin api extension.

Feedback and contributions welcome.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 6, 2020, 9:50pm UTC](https://meta.discourse.org/t/vscode-extension-for-syntax-highlighting-discourse-plugin-javascript/147051/2 "2020-04-06T21:50:54Z")

</div>

Great idea! I’ve noticed that issue. Thanks very much for making this as I’m a huge VSCode fan.

Might want to be careful with nomenclature though? A Theme Component is not a “Plugin” as such. That distinction is important because javascript highlighting works pretty well already with javascript Plugin files. And indeed it works fine in a Theme Component if residing in the `javascripts` folder.

I’ll have a go at using this and report any issues! Cheers!

---

<div class="post-metadata">

### Author: ![zcuric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zcuric/32/292837_2.png) [@zcuric](https://meta.discourse.org/u/zcuric)
#### Post date: [April 6, 2020, 9:55pm UTC](https://meta.discourse.org/t/vscode-extension-for-syntax-highlighting-discourse-plugin-javascript/147051/3 "2020-04-06T21:55:04Z")

</div>

> [@merefield](#):
>
> Might want to be careful with nomenclature though?

Yes. It’s confusing, because the script tag is marked as type `text/discourse-plugin` not `text/discourse-theme-component`. And the API is called PluginAPI 😅. I’ll think about it.

Regarding regular plugin js highlighting, it’s just javascript, not javascript in .html so it works out of the box.

Thanks! 👍

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [May 13, 2025, 3:54pm UTC](https://meta.discourse.org/t/vscode-extension-for-syntax-highlighting-discourse-plugin-javascript/147051/4 "2025-05-13T15:54:13Z")

</div>

2 posts were split to a new topic: [Add new highlightjs languages](https://meta.discourse.org/t/add-new-highlightjs-languages/365937)
