mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[Preview]Adding new filetypes for developer file preview (#17183)
* push * push * push * Adressed comments and adjusted a thing * Added xslt * push * push. Ready to review * Spellcheck adjustments * Add installer stuff * Changed reg and removed xsl Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com> * Fixed tab * Updated monaco_languages.json Co-authored-by: Stefan Markovic <stefan@janeasystems.com> Co-authored-by: htcfreek <61519853+htcfreek@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
export function regDefinition() {
|
||||
return {
|
||||
tokenPostfix: '.reg',
|
||||
tokenizer: {
|
||||
root: [
|
||||
// Header (case sensitive)
|
||||
[/Windows Registry Editor Version 5.00/, 'comment'],
|
||||
[/REGEDIT4/, 'comment'],
|
||||
// Comments
|
||||
[/;.*/, "comment"],
|
||||
// Keys
|
||||
[/\[\-.*\]/, 'invalid'],
|
||||
[/\\.*[^\]]/, 'keyword'],
|
||||
// Values
|
||||
[/@/, "keyword"],
|
||||
[/\".*\"=\-/, "invalid"],
|
||||
[/\".*\"(?=\=)/, "keyword"],
|
||||
[/\".*\"(?!\=)/, 'string'],
|
||||
[/hex\({0,1}[0-9,a,b]\)|hex|dword(?=\:)/, "type"],
|
||||
[/[0-9,a-f,A-F][0-9,a-f,A-F],*/, 'string'],
|
||||
// Hive names (case in-sensitive)
|
||||
[/HKEY_CLASSES_ROOT/, 'type'],
|
||||
[/HKEY_LOCAL_MACHINE/, 'type'],
|
||||
[/HKEY_USERS/, 'type'],
|
||||
[/HKEY_CURRENT_USER/, 'type'],
|
||||
[/HKEY_PERFORMANCE_DATA/, 'type'],
|
||||
[/HKEY_DYN_DATA/, 'type'],
|
||||
[/hkey_classes_root/, 'type'],
|
||||
[/hkey_local_machine/, 'type'],
|
||||
[/hkey_users/, 'type'],
|
||||
[/hkey_current_user/, 'type'],
|
||||
[/hkey_performance_data/, 'type'],
|
||||
[/hkey_dyn_data/, 'type'],
|
||||
// Symbols (For better contrast on hc-black)
|
||||
[/=/, 'delimiter'],
|
||||
[/\[/, 'delimiter'],
|
||||
[/]/, 'delimiter'],
|
||||
[/:/, 'delimiter'],
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user