当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript TextDocuments.all方法代码示例

本文整理汇总了TypeScript中vscode-languageserver.TextDocuments.all方法的典型用法代码示例。如果您正苦于以下问题:TypeScript TextDocuments.all方法的具体用法?TypeScript TextDocuments.all怎么用?TypeScript TextDocuments.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vscode-languageserver.TextDocuments的用法示例。


在下文中一共展示了TextDocuments.all方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

connection.onDidChangeConfiguration(change => {
  config = change.settings;
  vls.configure(config);

  // Update formatting setting
  documents.all().forEach(triggerValidation);
});
开发者ID:cryptobuks,项目名称:tandem,代码行数:7,代码来源:pcServerMain.ts

示例2: if

connection.onDidChangeConfiguration((change) => {
	globalSettings = change.settings;

	documentSettings = {}; // reset all document settings
	languageModes.getAllModes().forEach(m => {
		if (m.configure) {
			m.configure(change.settings);
		}
	});
	documents.all().forEach(triggerValidation);

	// dynamically enable & disable the formatter
	if (clientDynamicRegisterSupport) {
		let enableFormatter = globalSettings && globalSettings.html && globalSettings.html.format && globalSettings.html.format.enable;
		if (enableFormatter) {
			if (!formatterRegistration) {
				let documentSelector: DocumentSelector = [{ language: 'html' }, { language: 'handlebars' }]; // don't register razor, the formatter does more harm than good
				formatterRegistration = connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector });
			}
		} else if (formatterRegistration) {
			formatterRegistration.then(r => r.dispose());
			formatterRegistration = null;
		}
	}

});
开发者ID:armanio123,项目名称:vscode,代码行数:26,代码来源:htmlServerMain.ts

示例3:

connection.onDidChangeConfiguration((change) => {
	languageModes.getAllModes().forEach(m => {
		if (m.configure) {
			m.configure(change.settings);
		}
	});
	documents.all().forEach(triggerValidation);
});
开发者ID:,项目名称:,代码行数:8,代码来源:

示例4: validateMany

connection.onDidChangeWatchedFiles(() => {
	configWatcherStatus = true;
	if (!configResolver) {
		return;
	}

	validateMany(allDocuments.all());
});
开发者ID:mrmlnc,项目名称:vscode-puglint,代码行数:8,代码来源:server.ts

示例5: annotateWithVersionMap

 private async annotateWithVersionMap(promise: Promise<Analysis>) {
   const versionMap = new Map<string, number>();
   for (const document of this.documents.all()) {
     versionMap.set(document.uri, document.version);
   }
   const analysis = await promise;
   this.analysisVersionMap.set(analysis, versionMap);
   return analysis;
 }
开发者ID:Polymer,项目名称:tools,代码行数:9,代码来源:analyzer-synchronizer.ts

示例6: validateAllTextDocuments

connection.onDidChangeConfiguration(async (params) => {
    globalSettings = params.settings;

    // Clear cache.
    configPathCache = {};

    settingsCache.flush();

    // Revalidate any open text documents.
    await validateAllTextDocuments(documents.all());
});
开发者ID:glen-84,项目名称:vscode-sass-lint,代码行数:11,代码来源:sass-lint-server.ts

示例7:

connection.onDidChangeConfiguration((change) => {
	settings = change.settings;
	let validationSettings = settings && settings.html && settings.html.validate || {};
	validation.css = validationSettings.styles !== false;
	validation.javascript = validationSettings.scripts !== false;

	languageModes.getAllModes().forEach(m => {
		if (m.configure) {
			m.configure(change.settings);
		}
	});
	documents.all().forEach(triggerValidation);
});
开发者ID:fs814,项目名称:vscode,代码行数:13,代码来源:htmlServerMain.ts

示例8:

connection.onDidChangeConfiguration((change) => {
  const apiElementsSettings: ApiElementsSettings = change.settings.apiElements;
  currentSettings = lodash.cloneDeep(apiElementsSettings);
  debouncedValidateTextDocument = lodash.debounce(validateTextDocument, apiElementsSettings.validation.debounce);

  const desideredSymbolNames =
    Object.keys(apiElementsSettings.symbols).filter((sym) => apiElementsSettings.symbols[sym] === true);

  desideredSymbols =
    defaultRefractSymbolsTree.filter((sym) => lodash.includes(desideredSymbolNames, sym.friendlyName));

  // Revalidate any open text documents
  documents.all().forEach(validateTextDocument);
});
开发者ID:XVincentX,项目名称:vscode-apielements,代码行数:14,代码来源:server.ts


注:本文中的vscode-languageserver.TextDocuments.all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。