Class Main

Defined in: lib/main.coffee

Overview

The Minimap package provides an eagle-eye view of text buffers.

It also provides API for plugin packages that want to interact with the minimap and be available to the user through the minimap settings.

Plugins Interface

Plugins should conform to the following interface:

class Plugin
  void activatePlugin: ->
  void deactivatePlugin: ->
  bool isActive: ->

Instance Method Summary

Instance Method Details

::activate() Source

Activates the minimap package.

::deactivate() Source

Deactivates the minimap package.

::generatePlugin() Source

Opens the plugin generation view.

Minimap ::getActiveMinimap() Source

Returns the Minimap of the active TextEditor.

Returns:

Minimap ::minimapForEditor(textEditor) Source

Returns the Minimap object associated to the passed-in TextEditor.

Parameters:

  • editorViewAn Editor instance

Returns:

Minimap ::minimapForEditorElement(editorElement) Source

Returns the Minimap object associated to the passed-in TextEditorElement.

Parameters:

  • editorElementAn TextEditorElement instance

Returns:

::observeMinimaps(iterator) Source

Calls iterator for each present and future minimaps. It returns a Disposable to unsubscribe the iterator from being called for future views.

Parameters:

  • (Function) iteratorA Function to call for each minimap view. It will receive the Minimap instance as parameter.

Returns:

  • Returns a Disposable.

::onDidActivate(callback) Source

Calls the callback when the minimap package have been activated.

Parameters:

  • (Function) callbackThe callback Function.

Returns:

  • Returns a Disposable.

::onDidActivatePlugin(callback) Source

Calls the callback when a plugin have been activated.

Parameters:

  • (Function) callbackThe callback Function. The event the callback will receive have the following properties:
    • (String) nameThe plugin name String.
    • (Object) pluginThe plugin Object.

Returns:

  • Returns a Disposable.

::onDidAddPlugin(callback) Source

Calls the callback when a plugin have been registered.

Parameters:

  • (Function) callbackThe callback Function. The event the callback will receive have the following properties:
    • (String) nameThe plugin name String.
    • (Object) pluginThe plugin Object.

Returns:

  • Returns a Disposable.

::onDidCreateMinimap(callback) Source

Calls the callback when a minimap have been created.

Parameters:

  • (Function) callbackThe callback Function. The callback will receive Minimap that was created.

Returns:

  • Returns a Disposable.

::onDidDeactivate(callback) Source

Calls the callback when the minimap package have been deactivated.

Parameters:

  • (Function) callbackThe callback Function.

Returns:

  • Returns a Disposable.

::onDidDeactivatePlugin(callback) Source

Calls the callback when a plugin have been deactivated.

Parameters:

  • (Function) callbackThe callback Function. The event the callback will receive have the following properties:
    • (String) nameThe plugin name String.
    • (Object) pluginThe plugin Object.

Returns:

  • Returns a Disposable.

::onDidRemovePlugin(callback) Source

Calls the callback when a plugin have been unregistered.

Parameters:

  • (Function) callbackThe callback Function. The event the callback will receive have the following properties:
    • (String) nameThe plugin name String.
    • (Object) pluginThe plugin Object.

Returns:

  • Returns a Disposable.

::toggle() Source

Toggles the minimap display.

Boolean ::versionMatch(expectedVersion) Source

Verifies that the passed-in version expression is satisfied by the current minimap version.

Parameters:

  • expectedVersionA semver compatible expression to match agains the minimap version.

Returns: