Syntax highlighting for Slashdown - "For when MDX is too much, but Markdown is too little."
This extension provides comprehensive syntax highlighting for Slashdown files, including:
- Tag syntax:
/tagnamewith proper highlighting for HTML-like tags - IDs:
#id-namehighlighting - Classes:
.class-namehighlighting - Attributes: Support for both
key="value"and boolean attributes - Text content:
= inline textsyntax - Comments:
//line comments - Code fences: Triple backtick code blocks with language-specific syntax highlighting
- Markdown: Full markdown support including:
- Headings (h1-h6)
- Bold and italic text
- Inline code
- Links
- Lists (ordered and unordered)
Create a file with a .sd or .slashdown extension and start writing Slashdown:
/header .flex.justify-between
# Slashdown
[Get it](#)
/ul .grid.grid-cols-3
/li
### Easy to read
- lots of space
/li
### Fast to write
- type, type, type
/li
### You already know it
- Just markdown with extra oomph
Start a tag with / followed by the tag name:
/div
/header
/button
Use / alone as shorthand for div:
/ #container .wrapper
Add IDs with # and classes with .:
/header #main-header .flex.justify-between
Add attributes on the same line or on following lines:
/button = Click me
hx-post="/api/roll"
hx-trigger="click"
class="bg-blue-500"
disabled
Use = for inline text content:
/h1 = Hello World
/p = This is a paragraph
Regular markdown works anywhere:
/article
# Main Heading
This is a paragraph with **bold** and *italic* text.
- List item 1
- List item 2
Triple backticks work as expected:
/div
Here's some code:
```javascript
console.log('Hello, world!');
```
Use // for line comments:
// This is a comment
/div
// This is also a comment
# Not a comment
- Download the
.vsixfile from the releases - Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Click the "..." menu at the top
- Select "Install from VSIX..."
- Choose the downloaded
.vsixfile
- Clone this repository
- Run
npm install -g @vscode/vsceif you don't have it - Run
vsce packagein the extension directory - Install the generated
.vsixfile as described above
- Visual Studio Code 1.75.0 or higher
None at this time. Please report issues on the GitHub repository.
Initial release of Slashdown syntax highlighting:
- Tag syntax highlighting
- ID and class highlighting
- Attribute highlighting
- Inline text content
- Markdown support
- Code fence support with language-specific highlighting
- Comment support
Slashdown is a markup language that combines the simplicity of Markdown with HTML-like tag syntax. Learn more at github.com/nickisnoble/slashdown.
MIT