Skip to content

maml-dev/maml-grammar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

MAML Grammar

This repository contains a TextMate grammar for the MAML language.

Files

  • maml.json — the TextMate (TM) grammar definition.

Use with VitePress

VitePress uses Shiki under the hood for code highlighting. You can register the MAML grammar and enable highlighting for code blocks like:

```maml
# your MAML code here
```

Copy maml.json to .vitepress directory.

Update configuration like this:

+const __dirname = new URL('.', import.meta.url).pathname
+const mamlLang = JSON.parse(fs.readFileSync(__dirname + '/maml.json', 'utf8'))

export default defineConfig({
  ...
  markdown: {
+    shikiSetup(shiki) {
+      shiki.loadLanguage(mamlLang)
+    },
  },
  ...
})

License

MIT

About

MAML Grammar

Resources

License

Stars

Watchers

Forks