[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:
Aaron Junker
2022-04-14 16:09:49 +02:00
committed by GitHub
parent 038e8e1510
commit d9c8d8d4e2
10 changed files with 177 additions and 1021 deletions

View File

@@ -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'],
]
}
}
};