mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Add a hover to the server
This commit is contained in:
@ -47,7 +47,8 @@ connection.onInitialize((params: InitializeParams) => {
|
||||
// Tell the client that the server supports code completion
|
||||
completionProvider: {
|
||||
resolveProvider: true
|
||||
}
|
||||
},
|
||||
hoverProvider: true
|
||||
}
|
||||
};
|
||||
});
|
||||
@ -209,6 +210,12 @@ connection.onCompletionResolve(
|
||||
}
|
||||
);
|
||||
|
||||
connection.onHover(() => {
|
||||
return {
|
||||
contents: "Hello World"
|
||||
};
|
||||
});
|
||||
|
||||
/*
|
||||
connection.onDidOpenTextDocument((params) => {
|
||||
// A text document got opened in VSCode.
|
||||
|
||||
Reference in New Issue
Block a user