mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
lint: Format the typescript files properly
This commit is contained in:
parent
c6fab1993a
commit
cff2a0fe32
1 changed files with 13 additions and 13 deletions
|
@ -62,27 +62,27 @@ export function createClient(serverPath: string, workspace: Workspace, extraEnv:
|
||||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
||||||
position: positionOrRange
|
position: positionOrRange
|
||||||
}, token).then(
|
}, token).then(
|
||||||
(result) => {
|
(result) => {
|
||||||
const hover =
|
const hover =
|
||||||
client.protocol2CodeConverter.asHover(result);
|
client.protocol2CodeConverter.asHover(result);
|
||||||
if (hover) {
|
if (hover) {
|
||||||
const actions = (<any>result).actions;
|
const actions = (<any>result).actions;
|
||||||
if (actions) {
|
if (actions) {
|
||||||
hover.contents.push(renderHoverActions(actions));
|
hover.contents.push(renderHoverActions(actions));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return hover;
|
return hover;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
client.handleFailedRequest(
|
client.handleFailedRequest(
|
||||||
lc.HoverRequest.type,
|
lc.HoverRequest.type,
|
||||||
token,
|
token,
|
||||||
error,
|
error,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// Using custom handling of CodeActions to support action groups and snippet edits.
|
// Using custom handling of CodeActions to support action groups and snippet edits.
|
||||||
// Note that this means we have to re-implement lazy edit resolving ourselves as well.
|
// Note that this means we have to re-implement lazy edit resolving ourselves as well.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue