Skip to content

Commit

Permalink
#160 - support template variable highlighting for plaintext
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulKa committed Dec 17, 2024
1 parent 46d5e1a commit 1cc9ab6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum Language {
JSON = 'json',
XML = 'xml',
HTML = 'html',
TEXT = 'text',
TEXT = 'plaintext',
}

export function InputTabs(props: InputTabsProps) {
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions src/renderer/lib/monaco/language.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { languages } from 'monaco-editor';

// plaintext
languages.setMonarchTokensProvider('plaintext', {
tokenizer: {
root: [[/\{\{\s*(\w+)\s*}}/, 'variable.other']],
},
});

0 comments on commit 1cc9ab6

Please sign in to comment.