-
Notifications
You must be signed in to change notification settings - Fork 12
Spec
t9md edited this page Mar 1, 2017
·
3 revisions
- 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 ofnarrow
. - Item has to have
point
field. - If provider is not bound to single file, item also must have
filePath
field.
- e.g. Executing command by narrowing command list by
- 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.
- boundToSingleFile provider: e.g.
- Provider have corresponding, dedicated
narrow-ui
, in other wordnarrow-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
.
- And sync cursor position of active-editor with items on
-
narrow-editor
must be normal text-editor.- To edit and move cursor exactly same manner as other text-editor.
- e.g. Must be abled to use vim-mode-plus in
narrow-editor
. - I tried different approaches multiple times and failed.
- Now learned this "must be normal text editor" is most prioritized from UX standpoint.
- User invoke
narrow:scan
- Instantiate Scan provider and instantiate Ui to use for this provider.
- Open
narrow-editor
( Ui hold narrow-editor and control-bar etc..).