Provide onDidHighlght hook #13

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@t9md
Owner
t9md commented Jan 2, 2017 edited

fix #12
To create minimap plugin without mess

Things to consider

  • Performance impact by creating decoration for whole buffer
  • Update spec
@t9md
Owner
t9md commented Jan 2, 2017

ServiceProvider(=quick-highlight)

  • package.json
  "providedServices": {
    "quick-highlight": {
      "description": "quick-highlight events",
      "versions": {
        "1.0.0": "provideQuickHighlight"
      }
    }
  },

ServiceConsumer: 3rd party package which use quick-highlight service

  • package.json
  "consumedServices": {
    "quick-highlight": {
      "versions": {
        "1.0.0": "consumeQuickHighlight"
      }
    }
  • code to use service
  consumeQuickHighlight(quickHighlightService) {
    const boundHandler = this.onChangedHighlights.bind(this)
    this.subscriptions.add(quickHighlightService.onDidChangeHighlight(boundHandler))
  },
@gouegd
gouegd commented Jan 11, 2017

Hi t9md, is there any blocker on this, that I could help with ?

@t9md
Owner
t9md commented Jan 11, 2017

No if you agree with that I will merge it.

@gouegd
gouegd commented Jan 11, 2017 edited

I'm happy with the exposed service, thanks 👍
I will publish the minimap integration on apm when this is merged an published too.

@t9md t9md referenced this pull request Jan 12, 2017
Merged

Provide service 2nd try #17

@t9md
Owner
t9md commented Jan 12, 2017

Close in favor of #17.
And will send PR to you minimap-plugin soon.

@t9md t9md closed this Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment