98b1c76 Sep 9, 2017
1 contributor

Users who have contributed to this file

36 lines (26 sloc) 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.