|
1 | | -// @ts-check |
2 | | - |
3 | | -import { CompositeDisposable, Disposable, Range, Point, TextEditor, TextEditorElement, CommandEvent, CursorPositionChangedEvent } from "atom" |
| 1 | +import { |
| 2 | + CompositeDisposable, |
| 3 | + Disposable, |
| 4 | + Range, |
| 5 | + Point, |
| 6 | + TextEditor, |
| 7 | + TextEditorElement, |
| 8 | + CommandEvent, |
| 9 | + CursorPositionChangedEvent, |
| 10 | +} from "atom" |
4 | 11 | import type { Datatip, DatatipProvider } from "atom-ide-base" |
5 | 12 | import { ViewContainer } from "atom-ide-base/commons-ui/float-pane/ViewContainer" |
6 | 13 | import { ProviderRegistry } from "atom-ide-base/commons-atom/ProviderRegistry" |
@@ -49,7 +56,7 @@ export class DataTipManager { |
49 | 56 | /** |
50 | 57 | * config flag denoting if the data tip should be shown when moving the mouse cursor around |
51 | 58 | */ |
52 | | - showDataTipOnMouseMove = false |
| 59 | + showDataTipOnMouseMove = true |
53 | 60 |
|
54 | 61 | /** |
55 | 62 | * holds the range of the current data tip to prevent unnecessary show/hide calls |
@@ -328,10 +335,7 @@ export class DataTipManager { |
328 | 335 | * @param evt the original event triggering this data tip evaluation |
329 | 336 | * @return a promise object to track the asynchronous operation |
330 | 337 | */ |
331 | | - async showDataTip( |
332 | | - editor: TextEditor, |
333 | | - position: Point, |
334 | | - ): Promise<void> { |
| 338 | + async showDataTip(editor: TextEditor, position: Point): Promise<void> { |
335 | 339 | try { |
336 | 340 | let datatip: Datatip | null = null |
337 | 341 | for (const provider of this.providerRegistry.getAllProvidersForEditor(editor)) { |
@@ -424,7 +428,12 @@ export class DataTipManager { |
424 | 428 | * @param view the data tip component to display |
425 | 429 | * @return a composite object to release references at a later stage |
426 | 430 | */ |
427 | | - mountDataTipWithMarker(editor: TextEditor, range: Range, position: Point, view: ViewContainer): CompositeDisposable | null { |
| 431 | + mountDataTipWithMarker( |
| 432 | + editor: TextEditor, |
| 433 | + range: Range, |
| 434 | + position: Point, |
| 435 | + view: ViewContainer |
| 436 | + ): CompositeDisposable | null { |
428 | 437 | // TODO do we need this? |
429 | 438 | if (!view.element) { |
430 | 439 | // if the element is not created return right away |
|
0 commit comments