Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 969 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 969 Bytes

Scope Info

An extension for vscode that provides TextMate scope information.

For users

To view the TextMate scope information of your code, run scope-info: enable hover information; to disable, run scope-info: disable hover information.

For extension authors

This extension provides an API by which your extension can query scope & token information. Refer to scope-info.d.ts and extension.test.ts for more details. Example usage:

import * as vscode from 'vscode';
import * as scopeInfo from 'scope-info';

async function example(doc : vscode.TextDocument, pos: vscode.Position) : void {
  const siExt = vscode.extensions.getExtension<scopeInfo.ScopeInfoAPI>('siegebell.scope-info');
  const si = await siExt.activate();
  const token : scopeInfo.Token = si.getScopeAt(doc, pos);
}