Skip to content

Provider

t9md edited this page Mar 1, 2017 · 6 revisions

Built-in provider

scan

scan

  • Scan current editor( use editor.scan under the hood )
  • It use first narrow query as search term( first word separated by white-spaces on query text ).
  • Rest of include and exclude(! starting word) queries are treated as normal filter query.
  • To make this exceptional query handling obvious by eye, use different syntax grammar highlight for first query(= scan term).

search

search

  • Search by ag( you need to install ag by yourself).
  • Need to install ag by yourself.

atom-scan

atom-scan

  • Similar to search but use Atom's atom.workspace.scan.

fold

fold

  • Provide fold-starting rows as item.
  • Can change fold level to show up on narrow-editor by
    • narrow-ui:fold:increase-fold-level
    • narrow-ui:fold:decrease-fold-level

git-diff

git-diff

  • Show git-diff for current active-editor. Info source is core git-diff package.

git-diff-all

git-diff-all

  • Show all modified state file across project.
  • If you are comfortable with this provider, you don't need git-diff at all( like me ).

bookmarks

boorkmarks

  • Info source is core bookmarks package
  • This is toy, I don't use bookmarks feature heavily.

symbols

symbols

  • Provide symbols for current file.
  • Useful to quick previewing function definition on same file.

project-symbols

project-symbols

  • Provide project-wide symbols information by reading tags file.

linter

linter

  • Use message provided by linter package.

select-files

select-files

  • This is META provider used to select files for other provider.
  • Can start from clicking folder icon at control-bar.
  • Available for provider which is not boundToSingleFile( e.g. search, atom-scan ).

Provider specific configuration

directionToOpen

  • Possible value and short descriptions are here.
    • inherit: pick global setting.
    • right: default, no behavior change
    • right:never-use-previous-adjacent-pane: don't use previous adjacent pane( use only next adjacent )
    • right:always-new-pane:
    • down:
    • down:never-use-previous-adjacent-pane:
    • down:always-new-pane:

caseSensitivityForNarrowQuery

negateNarrowQueryByEndingExclamation

  • When true, foo! means "not matching foo" as like !foo means that.
  • Only select-files provider enabled by default. ( To exclude md file by md!).
    • This is better than !md keystroke.
    • Since user can confirm which files are excluded.
    • At the timing when query become md and before adding ending !.

autoPreview

  • When you move cursor on narrow-editor, item under cursor is automatically opened to preview.

autoPreviewOnQueryChange

  • When you input query and items on narrow-editor re-rendered, auto-preview first item.

closeOnConfirm

  • When true, close narrow-editor on confirmed by enter.
  • Set to false if you want keep narrow-editor open after confirmation.
    • Or you can use narrow-ui:confirm-keep-open as alternative.

revealOnStartCondition

Reveal closest item at startup.

  • Value can be
    • never: Never reveal
    • always: Always try to reveal
    • on-input: Reveal when initial query was provided via -by-current-word commands.
  • Each provider have different default value( opinionated ). So no global default.
    • Basic strategy to choose default value is below.
      • boundToSingleFile provider( scan, fold, symbols ) have on-input default
      • Other have always default( search, atom-scan, git-diff-all ).
Clone this wiki locally