mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 * Fixes and cleanup * Distro * Fix hygiene yarn * delete no yarn lock changes file * Fix hygiene * Fix layer check * Fix CI * Skip lib checks * Remove tests deleted in vs code * Fix tests * Distro * Fix tests and add removed extension point * Skip failing notebook tests for now * Disable broken tests and cleanup build folder * Update yarn.lock and fix smoke tests * Bump sqlite * fix contributed actions and file spacing * Fix user data path * Update yarn.locks Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -11,29 +11,32 @@ let https = require('https');
|
||||
let url = require('url');
|
||||
|
||||
// list of languagesId not shipped with VSCode. The information is used to associate an icon with a language association
|
||||
// Please try and keep this list in alphabetical order! Thank you.
|
||||
let nonBuiltInLanguages = { // { fileNames, extensions }
|
||||
"r": { extensions: ['r', 'rhistory', 'rprofile', 'rt'] },
|
||||
"argdown": { extensions: ['ad', 'adown', 'argdown', 'argdn'] },
|
||||
"elm": { extensions: ['elm'] },
|
||||
"ocaml": { extensions: ['ml', 'mli'] },
|
||||
"nunjucks": { extensions: ['nunjucks', 'nunjs', 'nunj', 'nj', 'njk', 'tmpl', 'tpl'] },
|
||||
"mustache": { extensions: ['mustache', 'mst', 'mu', 'stache'] },
|
||||
"erb": { extensions: ['erb', 'rhtml', 'html.erb'] },
|
||||
"terraform": { extensions: ['tf', 'tfvars', 'hcl'] },
|
||||
"vue": { extensions: ['vue'] },
|
||||
"sass": { extensions: ['sass'] },
|
||||
"puppet": { extensions: ['puppet'] },
|
||||
"kotlin": { extensions: ['kt'] },
|
||||
"jinja": { extensions: ['jinja'] },
|
||||
"haxe": { extensions: ['hx'] },
|
||||
"haskell": { extensions: ['hs'] },
|
||||
"gradle": { extensions: ['gradle'] },
|
||||
"bicep": { extensions: ['bicep'] },
|
||||
"elixir": { extensions: ['ex'] },
|
||||
"haml": { extensions: ['haml'] },
|
||||
"stylus": { extensions: ['styl'] },
|
||||
"vala": { extensions: ['vala'] },
|
||||
"elm": { extensions: ['elm'] },
|
||||
"erb": { extensions: ['erb', 'rhtml', 'html.erb'] },
|
||||
"github-issues": { extensions: ['github-issues'] },
|
||||
"todo": { fileNames: ['todo'] }
|
||||
"gradle": { extensions: ['gradle'] },
|
||||
"godot": { extensions: ['gd', 'godot', 'tres', 'tscn'] },
|
||||
"haml": { extensions: ['haml'] },
|
||||
"haskell": { extensions: ['hs'] },
|
||||
"haxe": { extensions: ['hx'] },
|
||||
"jinja": { extensions: ['jinja'] },
|
||||
"kotlin": { extensions: ['kt'] },
|
||||
"mustache": { extensions: ['mustache', 'mst', 'mu', 'stache'] },
|
||||
"nunjucks": { extensions: ['nunjucks', 'nunjs', 'nunj', 'nj', 'njk', 'tmpl', 'tpl'] },
|
||||
"ocaml": { extensions: ['ml', 'mli', 'mll', 'mly', 'eliom', 'eliomi'] },
|
||||
"puppet": { extensions: ['puppet'] },
|
||||
"r": { extensions: ['r', 'rhistory', 'rprofile', 'rt'] },
|
||||
"sass": { extensions: ['sass'] },
|
||||
"stylus": { extensions: ['styl'] },
|
||||
"terraform": { extensions: ['tf', 'tfvars', 'hcl'] },
|
||||
"todo": { fileNames: ['todo'] },
|
||||
"vala": { extensions: ['vala'] },
|
||||
"vue": { extensions: ['vue'] }
|
||||
};
|
||||
|
||||
// list of languagesId that inherit the icon from another language
|
||||
@@ -180,6 +183,16 @@ function darkenColor(color) {
|
||||
return res;
|
||||
}
|
||||
|
||||
function mergeMapping(to, from, property) {
|
||||
if (from[property]) {
|
||||
if (to[property]) {
|
||||
to[property].push(...from[property]);
|
||||
} else {
|
||||
to[property] = from[property];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getLanguageMappings() {
|
||||
let langMappings = {};
|
||||
let allExtensions = fs.readdirSync('..');
|
||||
@@ -202,7 +215,22 @@ function getLanguageMappings() {
|
||||
if (Array.isArray(filenames)) {
|
||||
mapping.fileNames = filenames.map(function (f) { return f.toLowerCase(); });
|
||||
}
|
||||
langMappings[languageId] = mapping;
|
||||
let existing = langMappings[languageId];
|
||||
|
||||
if (existing) {
|
||||
// multiple contributions to the same language
|
||||
// give preference to the contribution wth the configuration
|
||||
if (languages[k].configuration) {
|
||||
mergeMapping(mapping, existing, 'extensions');
|
||||
mergeMapping(mapping, existing, 'fileNames');
|
||||
langMappings[languageId] = mapping;
|
||||
} else {
|
||||
mergeMapping(existing, mapping, 'extensions');
|
||||
mergeMapping(existing, mapping, 'fileNames');
|
||||
}
|
||||
} else {
|
||||
langMappings[languageId] = mapping;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,6 +242,8 @@ function getLanguageMappings() {
|
||||
return langMappings;
|
||||
}
|
||||
|
||||
|
||||
|
||||
exports.copyFont = function () {
|
||||
return downloadBinary(font, './icons/seti.woff');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user