diff --git a/src/data/languages.json b/src/data/languages.json index 01efa6f..8018cbf 100644 --- a/src/data/languages.json +++ b/src/data/languages.json @@ -4,11 +4,16 @@ "asp", "assembly", "ahk", + "applescript", + "appveyor", "autoit", + "babel", "bower", "brainfuck", "gemfile", "c", + "circleci", + "cargo", "cpp", "csharp", "cshtml", @@ -30,11 +35,14 @@ "elm", "erlang", "elixir", + "eslint", + "env", "fsharp", "git", "go", "gradle", "graphql", + "gulp", "handlebars", "haskell", "html", @@ -42,6 +50,7 @@ "ini", "pug", "jar", + "jest", "java", "julia", "js", @@ -49,9 +58,11 @@ "json", "kotlin", "lisp", + "log", "lua", "makefile", "markdown", + "markdownx", "marko", "nim", "nix", @@ -64,6 +75,7 @@ "powershell", "purescript", "python", + "postcss", "r", "reasonml", "ruby", @@ -79,6 +91,8 @@ "tsx", "twig", "text", + "travis", + "typescript-def", "vb", "vba", "vbhtml", @@ -90,7 +104,8 @@ "yaml", "yarn", "bat", - "wasm" + "wasm", + "webpack" ], "knownExtentions": { ".swf": { @@ -105,6 +120,15 @@ ".swc": { "image": "as" }, + "/(\\.)?angular(-cli)?\\.json/i": { + "image": "angular" + }, + "/angular.(component|guard|service|pipe|filter|directive|resolver).(ts|js)/i": { + "image": "angular" + }, + "androidmanifest.xml": { + "image": "android" + }, ".asp": { "image": "asp" }, @@ -144,6 +168,9 @@ ".d-objdump": { "image": "assembly" }, + "/gruntfile\\.(js|coffee)/i": { + "image": "gruntfile" + }, "/\\.gcode|\\.gco/i": { "image": "assembly" }, @@ -165,6 +192,9 @@ ".ahkl": { "image": "ahk" }, + ".applescript": { + "image": "applescript" + }, ".au3": { "image": "autoit" }, @@ -195,15 +225,30 @@ ".cats": { "image": "cpp" }, + "/(cargo.toml|cargo.lock)/i": { + "image": "cargo" + }, + "circle.yml": { + "image": "circleci" + }, + "/\\.codeclimate\\.(yml|json)/i": { + "image": "codeclimate" + }, ".idc": { "image": "cpp" }, ".w": { "image": "cpp" }, + "/webpack(\\.dev|\\.development|\\.prod|\\.production)?\\.config\\.js/i": { + "image": "webpack" + }, ".nc": { "image": "cpp" }, + ".npmrc": { + "image": "npm" + }, ".upc": { "image": "cpp" }, @@ -258,15 +303,24 @@ ".litcoffee": { "image": "coffee" }, + ".ls": { + "image": "livescript" + }, ".iced": { "image": "coffee" }, "/\\.e?cr$/i": { "image": "crystal" }, + ".css.map": { + "image": "cssmap" + }, ".css": { "image": "css" }, + ".cu": { + "image": "cuda" + }, ".less": { "image": "less" }, @@ -300,24 +354,48 @@ ".cson": { "image": "manifest" }, + "/(\\.firebaserc|firebase\\.json)/i": { + "image": "firebase" + }, ".json5": { "image": "manifest" }, ".http": { - "image": "manifest" + "image": "http" }, ".ndjson": { "image": "manifest" }, + "nodemon.json": { + "image": "nodemon" + }, ".fea": { "image": "manifest" }, + ".flowconfig": { + "image": "flowconfig" + }, ".json.eex": { "image": "manifest" }, + "prisma.yml": { + "image": "prisma" + }, + ".prettierignore": { + "image": "prettier" + }, + "/\\.prettier((rc)|(\\.(toml|yml|yaml|json|js))?$){2}/i": { + "image": "prettier" + }, + "prettier.config.js": { + "image": "prettier" + }, ".proto": { "image": "manifest" }, + "/^procfile/i": { + "image": "heroku" + }, ".pytb": { "image": "manifest" }, @@ -327,9 +405,15 @@ "/\\.pot?$/i": { "image": "manifest" }, + ".pcss": { + "image": "postcss" + }, ".ejson": { "image": "manifest" }, + ".editorconfig": { + "image": "editorconfig" + }, ".edn": { "image": "manifest" }, @@ -348,6 +432,12 @@ ".ttl": { "image": "manifest" }, + ".travis.yml": { + "image": "travis" + }, + ".rest": { + "image": "http" + }, ".rviz": { "image": "manifest" }, @@ -378,6 +468,9 @@ "/\\.git[\\/\\\\](.*[\\/\\\\])?(HEAD|ORIG_HEAD|packed-refs|logs[\\/\\\\](.+[\\/\\\\])?[^\\/\\\\]+)$/": { "image": "manifest" }, + "/gatsby-(browser|node|ssr|config)\\.js/i": { + "image": "gatsbyjs" + }, ".dfm": { "image": "delphi" }, @@ -414,6 +507,9 @@ ".app.src": { "image": "erlang" }, + "/(\\.)?appveyor\\.yml/i": { + "image": "appveyor" + }, "/^Emakefile$/": { "image": "erlang" }, @@ -453,9 +549,15 @@ "gradlew": { "image": "gradle" }, + ".gql": { + "image": "graphql" + }, ".graphql": { "image": "graphql" }, + "gulpfile.js": { + "image": "gulp" + }, "/\\.(hbs|handlebars|(mu)?stache)$/i": { "image": "handlebars" }, @@ -492,9 +594,18 @@ ".java": { "image": "java" }, - ".jil": { + "/\\.(jil|jl)/i": { "image": "julia" }, + "babel.config.js": { + "image": "babel" + }, + "jest.config.js": { + "image": "jest" + }, + ".js.map": { + "image": "jsmap" + }, ".js": { "image": "js" }, @@ -504,6 +615,9 @@ ".es": { "image": "js" }, + ".env": { + "image": "env" + }, ".mjs": { "image": "js" }, @@ -543,6 +657,9 @@ ".sexp": { "image": "lisp" }, + ".log": { + "image": "log" + }, ".lua": { "image": "lua" }, @@ -588,6 +705,9 @@ "/\\.(md|mdown|markdown|mkd|mkdown|mdwn|mkdn|rmd|ron|pmd)$/i": { "image": "markdown" }, + ".mdx": { + "image": "markdownx" + }, ".nim": { "image": "nim" }, @@ -618,6 +738,9 @@ ".eliomi": { "image": "ocaml" }, + "/\\.(eslintrc|eslintignore)/i": { + "image": "eslint" + }, ".ml4": { "image": "ocaml" }, @@ -702,6 +825,9 @@ ".inc": { "image": "pawn" }, + ".ino": { + "image": "arduino" + }, ".pwn": { "image": "pawn" }, @@ -906,12 +1032,18 @@ ".texi": { "image": "tex" }, + "heroku.yml": { + "image": "heroku" + }, "/^hyphen(ex)?\\.(cs|den|det|fr|sv|us)$/": { "image": "tex" }, ".toml": { "image": "toml" }, + "/.*\\.d\\.ts/i": { + "image": "typescript-def" + }, ".ts": { "image": "ts" }, @@ -946,10 +1078,10 @@ "image": "vba" }, ".vbhtml": { - "image": "vbhtml" + "image": "vb" }, ".vbproj": { - "image": "vbproj" + "image": "vb" }, ".vcxproj": { "image": "vcxproj" @@ -972,6 +1104,9 @@ ".yarnrc": { "image": "yarn" }, + "/\\.babelrc/i": { + "image": "babel" + }, ".bat": { "image": "bat" }, diff --git a/src/structures/Activity.ts b/src/structures/Activity.ts index e901d0c..545a1af 100644 --- a/src/structures/Activity.ts +++ b/src/structures/Activity.ts @@ -64,7 +64,7 @@ export default class Activity implements Disposable { this._lastKnownFile = window.activeTextEditor.document.fileName; const filename = basename(window.activeTextEditor.document.fileName); largeImageKey = knownExtentions[Object.keys(knownExtentions).find(key => { - if (key.startsWith('.') && filename.endsWith(key)) return true; + if (filename.endsWith(key)) return true; const match = key.match(/^\/(.*)\/([mgiy]+)$/); if (!match) return false; const regex = new RegExp(match[1], match[2]);