Repository: eclipse-corrosion/corrosion (language: rust)

Issue:
[feature request] `toml` syntax higlighting only works for `Cargo.toml` but no other `*.toml` file
What says on the tin.

Opening a '.toml` file which is not `Cargo.toml` does not enable syntax highlighting. Unsuccessfully tried various workarounds such as: force open with Generic Text Editor, set up content types, etc.


Discussion / hints:
In https://github.com/eclipse/corrosion/blob/master/org.eclipse.corrosion/plugin.xml#L13 , we only define Cargo.toml as content-type and bind it with syntax highlighting.
We should instead have a generic *.toml content-type (bound with syntax highlighting) and a "child" Cargo.toml content-type.

Fix patch:
diff --git a/org.eclipse.corrosion/OSGI-INF/l10n/bundle.properties b/org.eclipse.corrosion/OSGI-INF/l10n/bundle.properties
index e8fc218..abc065d 100644
--- a/org.eclipse.corrosion/OSGI-INF/l10n/bundle.properties
+++ b/org.eclipse.corrosion/OSGI-INF/l10n/bundle.properties
@@ -3,6 +3,7 @@ Bundle-Vendor = Eclipse Corrosion
 Bundle-Name = Rust edition in Eclipse IDE
 content-type.name = Rust project file
 content-type.name.0 = Cargo manifest file
+toml.content-type.name = Toml file
 page.name = Rust
 page.name.0 = Text Editor
 category.name = Rust
diff --git a/org.eclipse.corrosion/plugin.xml b/org.eclipse.corrosion/plugin.xml
index eff4316..a67119b 100644
--- a/org.eclipse.corrosion/plugin.xml
+++ b/org.eclipse.corrosion/plugin.xml
@@ -3,6 +3,13 @@
 <plugin>
    <extension
          point="org.eclipse.core.contenttype.contentTypes">
+      <content-type
+            base-type="org.eclipse.core.runtime.text"
+            file-extensions="toml"
+            id="org.eclipse.corrosion.toml"
+            name="%toml.content-type.name"
+            priority="normal">
+      </content-type>
       <content-type
             base-type="org.eclipse.core.runtime.text"
             file-extensions="rs"
@@ -11,7 +18,7 @@
             priority="normal">
       </content-type>
       <content-type
-            base-type="org.eclipse.core.runtime.text"
+            base-type="org.eclipse.corrosion.toml"
             file-names="Cargo.toml"
             id="org.eclipse.corrosion.manifest"
             name="%content-type.name.0"
@@ -25,7 +32,7 @@
         editorId="org.eclipse.ui.genericeditor.GenericEditor">
    		</editorContentTypeBinding>
      <editorContentTypeBinding
-        contentTypeId="org.eclipse.corrosion.manifest"
+        contentTypeId="org.eclipse.corrosion.toml"
         editorId="org.eclipse.ui.genericeditor.GenericEditor">
    		</editorContentTypeBinding>
    </extension>
@@ -58,7 +65,7 @@
             scopeName="source.toml">
       </grammar>
       <scopeNameContentTypeBinding
-            contentTypeId="org.eclipse.corrosion.manifest"
+            contentTypeId="org.eclipse.corrosion.toml"
             scopeName="source.toml">
       </scopeNameContentTypeBinding>
    </extension>


Test patch: