Skip to content

Fix language-map.json build script#49

Merged
Claudiohbsantos merged 7 commits intomaterial-extensions:masterfrom
zm-cttae:fix/builtin-language-source
Apr 27, 2023
Merged

Fix language-map.json build script#49
Claudiohbsantos merged 7 commits intomaterial-extensions:masterfrom
zm-cttae:fix/builtin-language-source

Conversation

@zm-cttae
Copy link
Contributor

@zm-cttae zm-cttae commented Dec 8, 2022

  • Search for extension manifests in microsoft/vscode instead of microsoft (half the manifests, more languages).
  • Add logic to try match contributed filenames/extensions to their icon using the existing icon map.
  • Abstract the icon name logic in the build script.

Test case:

rimraf.sync(vsDataPath);
}

function handleIconRemapping(language, overrideType, contributionType, value) {
Copy link
Contributor Author

@zm-cttae zm-cttae Dec 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Claudiohbsantos

  • In PR Add language config mappings from VSC extensions #10 it was decided to keep this extension lean and rely on the icon pack
  • But that PR added a remap/overrides JSON (e.g. to make *.npmrc use npm icon)
  • The overrides mostly don't make sense e.g. stops the settings and properties icons from appearing on generic ignore/setup files
    For example, test.gitconfig gets the git icon but doesn't apply any configuration in git

Can I remove those overrides from build-languages.js and then uncheck language-map.json, remap.json?

This is the diff in `language-map.json`
diff --git a/src/language-map.json b/src/language-map.json
index 6cc164e..89ac1cb 100644
--- a/src/language-map.json
+++ b/src/language-map.json
@@ -45,7 +45,7 @@
     "dsql": "database",
     "dtml": "xml",
     "ebuild": "console",
-    "editorconfig": "editorconfig",
+    "editorconfig": "settings",
     "edn": "clojure",
     "ent": "xml",
     "es6": "javascript",
@@ -59,9 +59,11 @@
     "fxml": "xml",
     "gemspec": "ruby",
     "geojson": "json",
-    "gitattributes": "git",
-    "gitconfig": "git",
-    "gitmodules": "git",
+    "gitattributes": "settings",
+    "gitconfig": "settings",
+    "gitignore": "git",
+    "gitignore_global": "git",
+    "gitmodules": "settings",
     "gvy": "groovy",
     "gyp": "python",
     "gypi": "python",
@@ -102,7 +104,8 @@
     "mod": "xml",
     "mts": "typescript",
     "nf": "groovy",
-    "npmrc": "npm",
+    "npmignore": "git",
+    "npmrc": "settings",
     "nqp": "perl",
     "nuspec": "xml",
     "opml": "xml",
@@ -192,10 +195,8 @@
   },
   "fileNames": {
     ".devcontainer.json": "json",
-    ".env": "tune",
     ".envrc": "console",
     ".hushlogin": "console",
-    ".vscodeignore": "vscode",
     "APKBUILD": "console",
     "COMMIT_EDITMSG": "git",
     "Containerfile": "docker",
@@ -206,8 +207,8 @@
     "Makefile": "settings",
     "OCamlMakefile": "settings",
     "PKGBUILD": "console",
-    "SConscript": "python-misc",
-    "SConstruct": "python-misc",
+    "SConscript": "python",
+    "SConstruct": "python",
     "appraisals": "ruby",
     "argv.json": "json",
     "bashrc_Apple_Terminal": "console",
@@ -221,7 +222,7 @@
     "devcontainer.json": "json",
     "extensions.json": "json",
     "git-rebase-todo": "git",
-    "gitconfig": "git",
+    "gitconfig": "settings",
     "guardfile": "ruby",
     "gymfile": "ruby",
     "hobofile": "ruby",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and removed it in 866254f.

@Claudiohbsantos
Copy link
Member

@zm-cttae I know I'm already a couple of months late but just wanted to bump this PR so you see that I saw it. I will need to dig a little bit into what these changes would mean so it'll take me a little bit to have a proper review but overall I'm not against these changes.

@zm-cttae
Copy link
Contributor Author

Cool. The big change is #49 (comment) which brings us closer to the upstream extension in behaviour

@Claudiohbsantos Claudiohbsantos merged commit 075cea4 into material-extensions:master Apr 27, 2023
@zm-cttae zm-cttae deleted the fix/builtin-language-source branch April 27, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants