Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #98 from mrjones2014/bot/vimdoc/master
Browse files Browse the repository at this point in the history
chore: generated vimdoc
  • Loading branch information
mrjones2014 authored Oct 31, 2021
2 parents 5318ad2 + 6fb2b5c commit bc134f1
Showing 1 changed file with 69 additions and 40 deletions.
109 changes: 69 additions & 40 deletions doc/dash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ Table of Contents *dash-table-of-contents*
==============================================================================
1. Dash.nvim *dash-dash.nvim*

Query Dash.app <https://kapeli.com/dash> within Neovim with a Telescope picker!
Query Dash.app <https://kapeli.com/dash> 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 <https://github.com/nvim-telescope/telescope.nvim>
- fzf-lua <https://github.com/ibhagwan/fzf-lua>


After installing Dash.nvim, you must run `make install`. This can be done
through a post-install hook with most plugin managers.

Expand All @@ -27,9 +36,7 @@ Packer:
>
use({
'mrjones2014/dash.nvim',
requires = { 'nvim-telescope/telescope.nvim' },
run = 'make install',
disable = not vim.fn.has('macunix'),
})
<

Expand All @@ -38,16 +45,14 @@ Paq:

>
require("paq")({
'nvim-telescope/telescope.nvim';
{'mrjones2014/dash.nvim', run = 'make install'};
{ 'mrjones2014/dash.nvim', run = 'make install' };
})
<


Vim-Plug:

>
Plug 'nvim-telescope/telescope.nvim'
Plug 'mrjones2014/dash.nvim', { 'do': 'make install' }
<

Expand All @@ -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!

Expand All @@ -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)
<

Expand Down

0 comments on commit bc134f1

Please sign in to comment.