diff --git a/extension.js b/extension.js index 212a597..617a4e8 100644 --- a/extension.js +++ b/extension.js @@ -2,14 +2,10 @@ const autocloaking = require('./lib/autocloaking') const autocompletion = require('./lib/autocompletion') const commands = require('./lib/commands') const peeking = require('./lib/peeking') -const fileAssociations = require('./lib/fileAssociations') async function activate (context) { console.log('Dotenv is active') - console.log('Set file associations') - fileAssociations.run() - console.log('Load autocompletion') await autocompletion.run(context) diff --git a/lib/fileAssociations.js b/lib/fileAssociations.js deleted file mode 100644 index 2171cf7..0000000 --- a/lib/fileAssociations.js +++ /dev/null @@ -1,9 +0,0 @@ -const settings = require('./settings') - -const run = function () { - settings.populateFileAssociations() - - return true -} - -module.exports.run = run diff --git a/lib/settings.js b/lib/settings.js index b012a45..b42e955 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -10,19 +10,6 @@ const enableSecretpeekingKey = 'dotenv.enableSecretpeeking' // other settings from vscode or other extensions const editorTokenColorCustomizationsKey = 'editor.tokenColorCustomizations' -// actions -async function populateFileAssociations () { - const fileAssociationsKeys = 'files.associations' - - const existingFileAssociations = userConfig().get(fileAssociationsKeys) || {} - - existingFileAssociations['.env*'] = 'dotenv' - - await userConfig().update(fileAssociationsKeys, existingFileAssociations, vscode.ConfigurationTarget.Global) - - return true -} - async function autocloakingOff () { await userConfig().update(enableAutocloakingKey, false, vscode.ConfigurationTarget.Global) return false @@ -125,7 +112,6 @@ module.exports.autocloakingOff = autocloakingOff module.exports.autocloakingOn = autocloakingOn module.exports.mask = mask module.exports.unmask = unmask -module.exports.populateFileAssociations = populateFileAssociations // settings module.exports.autocloakingEnabled = autocloakingEnabled diff --git a/package.json b/package.json index a86e85b..9b008ae 100644 --- a/package.json +++ b/package.json @@ -107,58 +107,19 @@ "dotenv-vault" ], "extensions": [ - ".env", - ".env.vault", - ".env.me", - ".flaskenv", - ".env-sample", - ".env.sample", - ".env.example", - ".env.local", - ".env.dev", - ".env.dev.local", - ".env.build", - ".env.build.local", - ".env.development", - ".env.development.local", - ".env.test", - ".env.test.local", - ".env.testing", - ".env.qa", - ".env.qa.local", - ".env.ci", - ".env.ci.local", - ".env.fart", - ".env.uat", - ".env.uat.local", - ".env.stag", - ".env.stag.local", - ".env.stage", - ".env.stage.local", - ".env.staging", - ".env.staging.local", - ".env.live", - ".env.live.local", - ".env.production", - ".env.production.local", - ".env.prod", - ".env.prod.local", - ".env.previous", - ".env.staging.previous", - ".env.production.previous", - ".env.fat", ".fart", ".vault", ".project", ".me", ".secret", - ".env.secret", - ".env.secrets", - ".env.sync", - ".sync", + ".sync" + ], + "filenamePatterns": [ + ".env*" + ], + "filenames": [ ".flaskenv", - ".env.deploy", - ".env.deployment" + "user-dirs.dirs" ], "configuration": "./syntaxes/language-configuration.json" }