Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(private svn: Svn) {
const config = workspace.getConfiguration("svn");
this.enabled = config.get("enabled") === true;
svn
.isSvnAvailable()
.then(() => {
if (this.enabled && svn.isSvnAvailable()) {
this.init();
} else {
this.disable();
}
})
.catch(() => {});
}
export function load(myPluginId: string): IConfiguration {
let configuration = workspace.getConfiguration(myPluginId);
let useCodeSnippetsOnMethodSuggest = configuration.get('useCodeSnippetsOnMethodSuggest', defaultConfiguration.useCodeSnippetsOnMethodSuggest);
return {
useCodeSnippetsOnMethodSuggest
};
}
constructor() {
this._section = workspace.getConfiguration("prolog");
this._tabSize = this._section.get("format.tabSize", 4);
this._insertSpaces = this._section.get("format.insertSpaces", true);
this._tabDistance = this._insertSpaces ? 0 : this._tabSize;
this._executable = this._section.get("executablePath", "swipl");
this._args = ["--nodebug", "-q"];
this._outputChannel = window.createOutputChannel("PrologFormatter");
}
private validRange(doc: TextDocument, initRange: Range): Range {
private onConfiguration(): void {
const gitConfig = workspace.getConfiguration('git');
if (gitConfig.get('autofetch') === false) {
this.disable();
} else {
this.enable();
}
}
export function activate(context: ExtensionContext) {
extensionPath = context.extensionPath;
let config = workspace.getConfiguration(languageServerId);
let enableBugLinks = config.get('enableSwiftBugLinks', true);
if (enableBugLinks) { registerSwiftBugLinkProvider(context); }
let enableLanguageServer = config.get('enableLanguageServer', true);
if (enableLanguageServer) { registerSwiftLanguageServer(context); }
}