Fix language-map.json build script#49
Merged
Claudiohbsantos merged 7 commits intomaterial-extensions:masterfrom Apr 27, 2023
zm-cttae:fix/builtin-language-source
Merged
Fix language-map.json build script#49Claudiohbsantos merged 7 commits intomaterial-extensions:masterfrom zm-cttae:fix/builtin-language-source
Claudiohbsantos merged 7 commits intomaterial-extensions:masterfrom
zm-cttae:fix/builtin-language-source
Conversation
Switch extension manifest search from microsoft org to vscode repo. Abstract the icon name logic and fix some holes.
zm-cttae
commented
Dec 11, 2022
scripts/build-languages.js
Outdated
| rimraf.sync(vsDataPath); | ||
| } | ||
|
|
||
| function handleIconRemapping(language, overrideType, contributionType, value) { |
Contributor
Author
There was a problem hiding this comment.
- 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
*.npmrcusenpmicon) - 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.gitconfiggets 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",
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. |
Contributor
Author
|
Cool. The big change is #49 (comment) which brings us closer to the upstream extension in behaviour |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
processLanguageContributionbecauselangisn't reassigned backOnce fixed and run, any matches to
consolewill disappear inlanguage-map.json