Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Latest commit

 

History

History
35 lines (26 loc) · 1.13 KB

code-highlight.md

File metadata and controls

35 lines (26 loc) · 1.13 KB

Code Highlight

Put your cursor on a symbol to see relevant ranges highlighted.

Code Highlight

Service API

Provide the code highlight Atom service by adding this to your package.json:

"providedServices": {
  "code-highlight": {
    "versions": {
      "0.1.0": "provideCodeHighlight"
    }
  }
}

Then, in your package entry point, add:

export function provideCodeHighlight(): CodeHighlightProvider {}

You must return a CodeHighlightProvider object as described in atom-ide-code-highlight/lib/types.js.

  • grammarScopes should be a list of scope names of grammars that the provider should apply to.
  • priority will be used to determine the provider to use in the case of multiple providers.
  • highlight will be called every time the cursor position changes or the buffer changes with the current position. The returned array of ranges will be highlighted.