From 6fb2b5c1b070bb6b521e030b2c9cda4f14ae53ca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <> Date: Sun, 31 Oct 2021 23:03:25 +0000 Subject: [PATCH] chore: generated vimdoc --- doc/dash.txt | 109 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 69 insertions(+), 40 deletions(-) diff --git a/doc/dash.txt b/doc/dash.txt index 53123e9..626917c 100644 --- a/doc/dash.txt +++ b/doc/dash.txt @@ -13,12 +13,21 @@ Table of Contents *dash-table-of-contents* ============================================================================== 1. Dash.nvim *dash-dash.nvim* -Query Dash.app within Neovim with a Telescope picker! +Query Dash.app within Neovim with Telescope or +fzf-lua! Note: Dash is a Mac-only app, so you’ll only find this plugin useful on Mac. INSTALL *dash-install* +This plugin must be loaded _after_ your fuzzy-finder plugin of choice. +Currently supported fuzzy-finder plugins are: + + +- telescope.nvim +- fzf-lua + + After installing Dash.nvim, you must run `make install`. This can be done through a post-install hook with most plugin managers. @@ -27,9 +36,7 @@ Packer: > use({ 'mrjones2014/dash.nvim', - requires = { 'nvim-telescope/telescope.nvim' }, run = 'make install', - disable = not vim.fn.has('macunix'), }) < @@ -38,8 +45,7 @@ Paq: > require("paq")({ - 'nvim-telescope/telescope.nvim'; - {'mrjones2014/dash.nvim', run = 'make install'}; + { 'mrjones2014/dash.nvim', run = 'make install' }; }) < @@ -47,7 +53,6 @@ Paq: Vim-Plug: > - Plug 'nvim-telescope/telescope.nvim' Plug 'mrjones2014/dash.nvim', { 'do': 'make install' } < @@ -61,54 +66,76 @@ accept a bang (`!`). By default, it will search Dash.app with keywords based on config (see `file_type_keywords` in |dash-configuration|). The bang (`!`) will search without this keyword filtering. -`:Dash [query]` will open the Telescope picker, and if `[query]` is passed, it -will pre-fill the prompt with `[query]`. +`:Dash [query]` will open the fuzzy-finder, and if `[query]` is passed, it will +pre-fill the prompt with `[query]`. + +`:DashWord` will open the fuzzy-finder and pre-fill the prompt with the word +under the cursor. -`:DashWord` will open the Telescope picker and pre-fill the prompt with the -word under the cursor. +If using Telescope, these can also be accessed via `:Telescope dash search` and +`:Telescope dash search_no_filter`. If using fzf-lua, you can use `:FzfLua +dash`, or `:lua require('fzf-lua').dash({ bang = false, initial_text = '' })`. CONFIGURATION *dash-configuration* -`dash.nvim` can be configured in your Telescope config. Options and defaults -are described below: +WITH TELESCOPE ~ > require('telescope').setup({ extensions = { dash = { - -- configure path to Dash.app if installed somewhere other than /Applications/Dash.app - dash_app_path = '/Applications/Dash.app', - -- search engine to fall back to when Dash has no results, must be one of: 'ddg', 'duckduckgo', 'startpage', 'google' - search_engine = 'ddg', - -- debounce while typing, in milliseconds - debounce = 0, - -- map filetype strings to the keywords you've configured for docsets in Dash - -- setting to false will disable filtering by filetype for that filetype - -- filetypes not included in this table will not filter the query by filetype - -- check src/config.rs to see all defaults - -- the values you pass for file_type_keywords are merged with the defaults - -- to disable filtering for all filetypes, - -- set file_type_keywords = false - file_type_keywords = { - dashboard = false, - NvimTree = false, - TelescopePrompt = false, - terminal = false, - packer = false, - -- a table of strings will search on multiple keywords - javascript = { 'javascript', 'nodejs' }, - typescript = { 'typescript', 'javascript', 'nodejs' }, - typescriptreact = { 'typescript', 'javascript', 'react' }, - javascriptreact = { 'javascript', 'react' }, - -- you can also do a string, for example, - -- sh = 'bash' - }, + -- your config here } } }) < +WITH FZF-LUA ~ + +> + require('dash').setup({ + -- your config here + }) +< + + +Options and defaults are described below: + +> + { + -- configure path to Dash.app if installed somewhere other than /Applications/Dash.app + dash_app_path = '/Applications/Dash.app', + -- search engine to fall back to when Dash has no results, must be one of: 'ddg', 'duckduckgo', 'startpage', 'google' + search_engine = 'ddg', + -- debounce while typing, in milliseconds + debounce = 0, + -- map filetype strings to the keywords you've configured for docsets in Dash + -- setting to false will disable filtering by filetype for that filetype + -- filetypes not included in this table will not filter the query by filetype + -- check src/config.rs to see all defaults + -- the values you pass for file_type_keywords are merged with the defaults + -- to disable filtering for all filetypes, + -- set file_type_keywords = false + file_type_keywords = { + dashboard = false, + NvimTree = false, + TelescopePrompt = false, + terminal = false, + packer = false, + fzf = false, + -- a table of strings will search on multiple keywords + javascript = { 'javascript', 'nodejs' }, + typescript = { 'typescript', 'javascript', 'nodejs' }, + typescriptreact = { 'typescript', 'javascript', 'react' }, + javascriptreact = { 'javascript', 'react' }, + -- you can also do a string, for example, + -- sh = 'bash' + }, + } +< + + If you notice an issue with the default `file_type_keywords` or would like a new filetype added, please file an issue or submit a PR! @@ -125,8 +152,10 @@ The public API consists of two main functions. > + --- This will bind to the first fuzzy-finder it finds to be available, + --- checked in order: telescope, fzf-lua ---@param bang boolean @bang searches without any filtering - ---@param initial_text string @pre-fill text into the telescope picker + ---@param initial_text string @pre-fill text into the finder prompt require('dash').search(bang, initial_text) <