File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ export class DataTipManager {
282
282
// means the mouse event occured quite far away from where the text ends on that row. Do not
283
283
// show the datatip in such situations and hide any existing datatips (the mouse moved more to
284
284
// the right, away from the actual text)
285
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
285
286
// @ts -ignore: internal API
286
287
if ( distance >= this . editor . getDefaultCharWidth ( ) ) {
287
288
return this . unmountDataTip ( )
@@ -327,6 +328,8 @@ export class DataTipManager {
327
328
try {
328
329
let datatip : Datatip | null = null
329
330
for ( const provider of this . providerRegistry . getAllProvidersForEditor ( editor ) ) {
331
+ // we only need one and we want to process them synchronously
332
+ // eslint-disable-next-line no-await-in-loop
330
333
const providerTip = await provider . datatip ( editor , position )
331
334
if ( providerTip ) {
332
335
datatip = providerTip
Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ let datatipManager: DataTipManager
16
16
/**
17
17
* called by Atom when activating an extension
18
18
*/
19
- export async function activate ( ) {
19
+ export function activate ( ) {
20
20
// Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
21
21
subscriptions = new CompositeDisposable ( )
22
- if ( ! datatipManager ) datatipManager = new DataTipManager ( )
22
+ if ( ! datatipManager ) {
23
+ datatipManager = new DataTipManager ( )
24
+ }
23
25
subscriptions . add ( datatipManager )
24
26
25
27
install_deps ( ) . then ( ( ) => {
@@ -31,7 +33,6 @@ async function install_deps() {
31
33
// install package-deps if not loaded
32
34
if ( ! atom . packages . isPackageLoaded ( "busy-signal" ) ) {
33
35
// Dynamic import https://mariusschulz.com/blog/dynamic-import-expressions-in-typescript
34
- // @ts -ignore
35
36
await import ( "atom-package-deps" ) . then ( ( atom_package_deps ) => {
36
37
atom_package_deps . install ( "atom-ide-datatip" , true )
37
38
} )
You can’t perform that action at this time.
0 commit comments