Skip to content
t9md edited this page Mar 1, 2017 · 3 revisions

Overview

  • Provider provides items( collection of item ).
  • Basically all provider has to provide item which is openable as text file.
    • e.g. Executing command by narrowing command list by narrow-ui is out of scope of narrow.
    • Item has to have point field.
    • If provider is not bound to single file, item also must have filePath field.
  • Two kind of provider
    • boundToSingleFile provider: e.g. scan, fold, symbols.
      • Not show project and file header( since all items are from single file ).
      • Basically, this provider can detect non-saved change, and refresh items on did change buffer content.
        • symbols provider is exceptional, cannot detect change, need to save to make items up-to-date.
    • Not boundToSingleFile provider: e.g. search, atom-scan, git-diff-all.
      • Shows project and file header.
      • Basically, this provider can not detect non-saved change, and refresh items on buffer saved.
  • Provider have corresponding, dedicated narrow-ui, in other word narrow-ui is not shared by multiple provider.
  • narrow-ui is always bound to current active editor.
    • And sync cursor position of active-editor with items on narrow-editor.
  • narrow-editor must be normal text-editor.

Startup flow

  1. User invoke narrow:scan
  2. Instantiate Scan provider and instantiate Ui to use for this provider.
  3. Open narrow-editor( Ui hold narrow-editor and control-bar etc..).
Clone this wiki locally