Skip to content

Commit

Permalink
feat(config): add ruby syntax highlighting (#394)
Browse files Browse the repository at this point in the history
* feat(config): add ruby syntax highlightin
* docs(changeset): add ruby syntax highlighting
  • Loading branch information
riccardoperra authored Nov 12, 2022
1 parent 690b854 commit c6f16a1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-students-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@codeimage/config': patch
---

add ruby syntax highlighting
18 changes: 18 additions & 0 deletions packages/config/src/lib/base/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,24 @@ export const SUPPORTED_LANGUAGES: readonly LanguageDefinition[] = [
},
],
},
{
id: 'ruby',
label: 'Ruby',
color: '#701516',
plugin: () =>
Promise.all([
importLegacy(),
import('@codemirror/legacy-modes/mode/ruby'),
]).then(([cb, m]) => cb(m.ruby)),
icons: [
{
name: 'ruby',
extension: '.rb',
content: () => import('material-icon-theme/icons/ruby.svg?raw'),
matcher: /^.*\.(rb)$/,
},
],
},
{
id: 'plain-text',
label: 'Plain Text',
Expand Down

0 comments on commit c6f16a1

Please sign in to comment.