Skip to content

Commit

Permalink
Support range
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingwl committed Jan 19, 2021
1 parent 5a760dd commit 3944756
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Proto from '../protocol';
import { DocumentSelector } from '../utils/documentSelector';
import { ClientCapability, ITypeScriptServiceClient, ServerResponse, ExecConfig } from '../typescriptService';
import { conditionalRegistration, requireSomeCapability } from '../utils/dependentRegistration';
import { Position } from '../utils/typeConverters';
import { Range } from '../utils/typeConverters';

namespace ExperimentalProto {
export const enum CommandTypes {
Expand All @@ -33,7 +33,7 @@ namespace ExperimentalProto {

interface HintItem {
text: string;
position: Proto.Location;
range: Proto.TextSpan;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ class TypeScriptInlineHintsProvider implements vscode.InlineHintsProvider {
}

return response.body.map(hint => {
return new vscode.InlineHint(hint.text, Position.fromLocation(hint.position), hint.whitespaceBefore, hint.whitespaceAfter);
return new vscode.InlineHint(hint.text, Range.fromTextSpan(hint.range), hint.whitespaceBefore, hint.whitespaceAfter);
});
} catch (e) {
return [];
Expand Down

0 comments on commit 3944756

Please sign in to comment.