mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge branch 'master' into getTypeDefinitionAtPosition
Conflicts: src/services/services.ts
This commit is contained in:
@@ -559,6 +559,14 @@ module ts.server {
|
||||
throw new Error("Not Implemented Yet.");
|
||||
}
|
||||
|
||||
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications {
|
||||
throw new Error("Not Implemented Yet.");
|
||||
}
|
||||
|
||||
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications {
|
||||
throw new Error("Not Implemented Yet.");
|
||||
}
|
||||
|
||||
getProgram(): Program {
|
||||
throw new Error("SourceFile objects are not serializable through the server protocol.");
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ module ts.server {
|
||||
|
||||
getFormatCodeOptions(file?: string) {
|
||||
if (file) {
|
||||
var info = this.filenameToScriptInfo[file];
|
||||
var info = this.filenameToScriptInfo[file];
|
||||
if (info) {
|
||||
return info.formatCodeOptions;
|
||||
}
|
||||
@@ -750,6 +750,7 @@ module ts.server {
|
||||
if (content !== undefined) {
|
||||
var indentSize: number;
|
||||
info = new ScriptInfo(this.host, fileName, content, openedByClient);
|
||||
info.setFormatOptions(this.getFormatCodeOptions());
|
||||
this.filenameToScriptInfo[fileName] = info;
|
||||
if (!info.isOpen) {
|
||||
info.fileWatcher = this.host.watchFile(fileName, _ => { this.watchedFileChanged(fileName); });
|
||||
|
||||
@@ -542,7 +542,7 @@ module ts.server {
|
||||
IndentSize: formatOptions.IndentSize,
|
||||
TabSize: formatOptions.TabSize,
|
||||
NewLineCharacter: "\n",
|
||||
ConvertTabsToSpaces: true,
|
||||
ConvertTabsToSpaces: formatOptions.ConvertTabsToSpaces,
|
||||
};
|
||||
var indentPosition =
|
||||
compilerService.languageService.getIndentationAtPosition(file, position, editorOptions);
|
||||
|
||||
Reference in New Issue
Block a user