forked from jlandersen/vscode-kafka
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide documentation on hover, in .kafka files
Fixes jlandersen#149 Signed-off-by: azerr <[email protected]>
- Loading branch information
1 parent
7523059
commit b40ea16
Showing
4 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Hover, Position, TextDocument } from "vscode"; | ||
import { SelectedClusterProvider, TopicProvider } from "../kafkaFileLanguageService"; | ||
import { KafkaFileDocument } from "../parser/kafkaFileParser"; | ||
|
||
export class KafkaFileHover { | ||
|
||
constructor(selectedClusterProvider: SelectedClusterProvider, topicProvider: TopicProvider) { | ||
|
||
} | ||
|
||
async doHover(document: TextDocument, kafkaFileDocument: KafkaFileDocument, position: Position): Promise<Hover | undefined> { | ||
// Get the AST node before the position where complation was triggered | ||
const node = kafkaFileDocument.findNodeAt(position); | ||
if (!node) { | ||
return; | ||
} | ||
|
||
return new Hover('TODO ' + node.kind); | ||
} | ||
} |