Skip to content

Build your personal knowledge base with Trilium Notes

core: update the default list of enabled MIME types

Adorian Doran547f19ea95a0
diff --git a/packages/commons/src/lib/mime_type.ts b/packages/commons/src/lib/mime_type.ts
index 85f7c2d2d3..4e6be8d909 100644
--- a/packages/commons/src/lib/mime_type.ts
+++ b/packages/commons/src/lib/mime_type.ts
@@ -77,7 +77,7 @@ const MIME_TYPES_DICT_RAW = [
{ title: "Dart", mime: "application/dart", mdLanguageCode: "dart" },
{ title: "diff", mime: "text/x-diff", mdLanguageCode: "diff" },
{ title: "Django", mime: "text/x-django", mdLanguageCode: "django", icon: "bx bxl-django" },
- { title: "Dockerfile", mime: "text/x-dockerfile", mdLanguageCode: "dockerfile", icon: "bx bxl-docker" },
+ { title: "Dockerfile", mime: "text/x-dockerfile", mdLanguageCode: "dockerfile", default: true, icon: "bx bxl-docker" },
{ title: "DTD", mime: "application/xml-dtd", icon: "bx bx-code" },
{ title: "Dylan", mime: "text/x-dylan" },
{ title: "EBNF", mime: "text/x-ebnf", mdLanguageCode: "ebnf" },
@@ -100,13 +100,13 @@ const MIME_TYPES_DICT_RAW = [
{ title: "Gherkin", mime: "text/x-feature", mdLanguageCode: "gherkin" },
{ title: "GitHub Flavored Markdown", mime: "text/x-gfm", mdLanguageCode: "markdown", icon: "bx bxl-markdown" },
{ title: "Go", mime: "text/x-go", mdLanguageCode: "go", default: true, icon: "bx bxl-go-lang" },
- { title: "Groovy", mime: "text/x-groovy", mdLanguageCode: "groovy", default: true },
+ { title: "Groovy", mime: "text/x-groovy", mdLanguageCode: "groovy" },
{ title: "HAML", mime: "text/x-haml", mdLanguageCode: "haml" },
{ title: "Haskell (Literate)", mime: "text/x-literate-haskell" },
- { title: "Haskell", mime: "text/x-haskell", mdLanguageCode: "haskell", default: true },
+ { title: "Haskell", mime: "text/x-haskell", mdLanguageCode: "haskell" },
{ title: "Haxe", mime: "text/x-haxe", mdLanguageCode: "haxe" },
{ title: "HTML", mime: "text/html", mdLanguageCode: "html", default: true, icon: "bx bxl-html5" },
- { title: "HTTP", mime: "message/http", mdLanguageCode: "http", default: true },
+ { title: "HTTP", mime: "message/http", mdLanguageCode: "http" },
{ title: "HXML", mime: "text/x-hxml" },
{ title: "IDL", mime: "text/x-idl" },
{ title: "Java Server Pages", mime: "application/x-jsp", mdLanguageCode: "java", icon: "bx bxl-java" },
@@ -148,13 +148,13 @@ const MIME_TYPES_DICT_RAW = [
{ title: "Oz", mime: "text/x-oz" },
{ title: "Pascal", mime: "text/x-pascal", mdLanguageCode: "delphi" },
{ title: "PEG.js", mime: "text/x-pegjs" },
- { title: "Perl", mime: "text/x-perl", aliases: ["perl"], default: true },
+ { title: "Perl", mime: "text/x-perl", aliases: ["perl"] },
{ title: "PGP", mime: "application/pgp" },
{ title: "PHP", mime: "text/x-php", aliases: ["php"], default: true, icon: "bx bxl-php" },
{ title: "Pig", mime: "text/x-pig" },
{ title: "PLSQL", mime: "text/x-plsql", mdLanguageCode: "sql" },
{ title: "PostgreSQL", mime: "text/x-pgsql", mdLanguageCode: "pgsql", icon: "bx bxl-postgresql" },
- { title: "PowerShell", mime: "application/x-powershell", mdLanguageCode: "powershell", icon: "bx bxs-terminal" },
+ { title: "PowerShell", mime: "application/x-powershell", mdLanguageCode: "powershell", default: true, icon: "bx bxs-terminal" },
{ title: "Properties files", mime: "text/x-properties", mdLanguageCode: "properties" },
{ title: "ProtoBuf", mime: "text/x-protobuf", mdLanguageCode: "protobuf" },
{ title: "Pug", mime: "text/x-pug" },
@@ -166,7 +166,7 @@ const MIME_TYPES_DICT_RAW = [
{ title: "RPM Changes", mime: "text/x-rpm-changes" },
{ title: "RPM Spec", mime: "text/x-rpm-spec" },
{ title: "Ruby", mime: "text/x-ruby", mdLanguageCode: "ruby", default: true },
- { title: "Rust", mime: "text/x-rustsrc", mdLanguageCode: "rust" },
+ { title: "Rust", mime: "text/x-rustsrc", mdLanguageCode: "rust", default: true },
{ title: "SAS", mime: "text/x-sas", mdLanguageCode: "sas" },
{ title: "Sass", mime: "text/x-sass", icon: "bx bxl-sass" },
{ title: "Scala", mime: "text/x-scala" },
@@ -203,8 +203,8 @@ const MIME_TYPES_DICT_RAW = [
{ title: "TTCN", mime: "text/x-ttcn" },
{ title: "Turtle", mime: "text/turtle" },
{ title: "Twig", mime: "text/x-twig", mdLanguageCode: "twig" },
- { title: "TypeScript-JSX", mime: "text/typescript-jsx", aliases: ["tsx", "typescriptreact"] },
- { title: "TypeScript", mime: "application/typescript", mdLanguageCode: "typescript", aliases: ["ts"], icon: "bx bxl-typescript" },
+ { title: "TypeScript-JSX", mime: "text/typescript-jsx", aliases: ["tsx", "typescriptreact"], default: true },
+ { title: "TypeScript", mime: "application/typescript", mdLanguageCode: "typescript", aliases: ["ts"], default: true, icon: "bx bxl-typescript" },
{ title: "VB.NET", mime: "text/x-vb", mdLanguageCode: "vbnet", aliases: ["vb"] },
{ title: "VBScript", mime: "text/vbscript", mdLanguageCode: "vbscript" },
{ title: "Velocity", mime: "text/velocity" },
diff --git a/packages/trilium-core/src/services/options_init.ts b/packages/trilium-core/src/services/options_init.ts
index c23cb9c483..ce8a9aec1c 100644
--- a/packages/trilium-core/src/services/options_init.ts
+++ b/packages/trilium-core/src/services/options_init.ts
@@ -193,7 +193,7 @@ const defaultOptions: DefaultOption[] = [
{ name: "codeNoteIndentWithTabs", value: "false", isSynced: true },
{
name: "codeNotesMimeTypes",
- value: '["text/x-csrc","text/x-c++src","text/x-csharp","text/css","text/x-elixir","text/x-go","text/x-groovy","text/x-haskell","text/html","message/http","text/x-java","text/javascript","application/javascript;env=frontend","application/javascript;env=backend","application/json","text/x-kotlin","text/x-markdown","text/x-perl","text/x-php","text/x-python","text/x-ruby",null,"text/x-sql","text/x-sqlite;schema=trilium","text/x-swift","text/xml","text/x-yaml","text/x-sh","application/typescript"]',
+ value: '["text/x-csrc","text/x-c++src","text/x-csharp","text/css","text/x-dockerfile","text/x-go","text/html","text/x-java","text/javascript","application/javascript;env=frontend","application/javascript;env=backend","application/json","text/jsx","text/x-kotlin","text/x-markdown","text/x-php","application/x-powershell","text/x-python","text/x-ruby","text/x-rustsrc",null,"text/x-sql","text/x-sqlite;schema=trilium","text/x-swift","text/xml","text/x-yaml","text/x-sh","application/typescript","text/typescript-jsx"]',
isSynced: true
},
{ name: "codeNotesMimeTypesSortAlphabetically", value: "true", isSynced: true },