diff options
| author | Dave Lage <rockerboo@gmail.com> | 2020-09-07 00:49:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-07 00:49:09 -0400 |
| commit | a665cd2848ecf4235ab9a5531f1bfc7b2e416d20 (patch) | |
| tree | 80a4e8dbf91eaff6c555a36919ac00c18aa9fdc1 | |
| parent | 11a3c706093f6656ce33dabe0810f96490403818 (diff) | |
| parent | 24bc752bdcec2b36fb2e4ba4cdf596edc32c1e5b (diff) | |
Merge pull request #38 from rockerBOO/docs
docs: Add available API
| -rw-r--r-- | README.md | 116 |
1 files changed, 88 insertions, 28 deletions
@@ -2,11 +2,26 @@ Gaze deeply into unknown regions using the power of the moon. - +## What is Telescope? + +Telescope is a highly extendable fuzzy finder over lists. Items are shown in a popup with a prompt to search over. + +Support for: + +* LSP (references, document symbols, workspace symbols) +* Treesitter +* Grep +* Files (git, fd) +* Vim (command history, quickfix, loclist) +[What is Telescope?](https://www.twitch.tv/teej_dv/clip/RichDistinctPlumberPastaThat) + + + [Example video](https://www.youtube.com/watch?v=65AVwHZflsU) + ## Installation ```vim @@ -67,57 +82,102 @@ wrappers over common tasks). ### `builtin` ```lua -require'telescope.builtin'.git_files{ - -- See Picker for additional options - show_preview = true, -- Show preview - prompt = "Git File", - selection_strategy = "reset" -- follow, reset, line +require'telescope.builtin'.builtin{ + -- Optional + -- hide_filename = true + -- ignore_filename = true } ``` +Handy documentation, showcase of all tools available in Telescope. + +#### Files + ```lua -require'telescope.builtin'.live_grep{ - -- See Picker for additional options - prompt = "Live Grep", -} +require'telescope.builtin'.git_files{} ``` +Search your files in a git repo. Ignores files in your .gitignore. + ```lua -require'telescope.builtin'.lsp_references{ - -- See Picker for additional options - prompt = 'LSP References' +require'telescope.builtin'.fd{ + -- Optional + -- cwd = "/home/tj/" } ``` +Searches files in your working directory. ```lua -require'telescope.builtin'.quickfix{ - -- See Picker for additional options - prompt = 'Quickfix' +require'telescope.builtin'.grep_string{ + search = false -- Search term or <cword> } ``` ```lua -require'telescope.builtin'.loclist{ - -- See Picker for additional options - prompt = 'Loclist' -} +require'telescope.builtin'.live_grep{} ``` +#### Vim + ```lua -require'telescope.builtin'.grep_string{ - -- See Picker for additional options - prompt = 'Find Word', - search = false -- Search term or <cword> -} +require'telescope.builtin'.oldfiles{} ``` +Searches the vim oldfiles. See `:help v:oldfiles` + +```lua +require'telescope.builtin'.quickfix{} +``` + +Search on the quickfix. See `:help quickfix` + ```lua -require'telescope.builtin'.oldfiles{ - -- See Picker for additional options - prompt = 'Oldfiles', +require'telescope.builtin'.loclist{} +``` + +Search on the current window's location list. + +```lua +require'telescope.builtin'.command_history{} +``` + +Search the vim command history. + +#### LSP + +```lua +require'telescope.builtin'.lsp_references{} +``` + +Search on LSP references. + +```lua +require'telescope.builtin'.lsp_document_symbols{} +``` + +Search on LSP Document Symbols in the current document. + +```lua +require'telescope.builtin'.lsp_workspace_symbols{} +``` + +Search on all workspace symbols. + +```lua +require'telescope.builtin'.treesitter{ + -- Optional + bufnr = -- Buffer handle } ``` +Search on function names, variables, from Treesitter! + +```lua +require'telescope.builtin'.planets{} +``` + +Use the telescope. + ## Goals ### Pipeline Different Objects |
