diff --git a/autoload/SpaceVim/layers/tools/dash.vim b/autoload/SpaceVim/layers/tools/dash.vim new file mode 100644 index 000000000..d46140c5b --- /dev/null +++ b/autoload/SpaceVim/layers/tools/dash.vim @@ -0,0 +1,35 @@ +"============================================================================= +" dash.vim --- tools#dash layer file for SpaceVim +" Copyright (c) 2018 Shidong Wang & Contributors +" Author: Seong Yong-ju < sei40kr at gmail.com > +" URL: https://spacevim.org +" License: MIT license +"============================================================================= + +"" +" @section tools#dash, layer-tools-dash +" @parentsection layers +" This layer provides Dash integration for SpaceVim + +function! SpaceVim#layers#tools#dash#plugins() abort + return [ + \ ['rizzatti/dash.vim', { + \ 'on_map': { 'n': ['DashSearch', 'DashGlobalSearch'] } + \ }], + \ ] +endfunction + +function! SpaceVim#layers#tools#dash#config() abort + "" rizzatti/dash.vim {{{ + " Allows configuration of mappings between Vim filetypes and Dash's docsets. + let g:dash_map = extend({ + \ 'java': ['java', 'android', 'javafx', 'spring', 'javadoc'], + \ }, get(g:, 'dash_map', {})) + "" }}} + + let g:_spacevim_mappings_space.D = { 'name' : '+Dash' } + call SpaceVim#mapping#space#def('nmap', ['D', 'd'], + \ 'DashSearch', 'search word under cursor', 0) + call SpaceVim#mapping#space#def('nmap', ['D', 'D'], + \ 'DashGlobalSearch', 'search word under cursor in all docs', 0) +endfunction diff --git a/docs/layers/tools/dash.md b/docs/layers/tools/dash.md new file mode 100644 index 000000000..f03f34055 --- /dev/null +++ b/docs/layers/tools/dash.md @@ -0,0 +1,33 @@ +--- +title: "SpaceVim dash layer" +description: "This layer provides Dash integration for SpaceVim" +--- + +# [SpaceVim Layers:](https://spacevim.org/layers) tools#dash + + + +- [Description](#description) +- [Layer Installation](#layer-installation) +- [Key bindings](#key-bindings) + + + +## Description + +This layer provides Dash integration for SpaceVim. + +## Layer Installation + +To use this configuration layer, add it to your `~/.SpaceVim.d/init.vim`. + +```vim +call SpaceVim#layers#load('tools#dash') +``` + +## Key bindings + +| Key Binding | Description | +| ----------- | ------------------------------------ | +| `SPC D d` | search word under cursor | +| `SPC D D` | search word under cursor in all docs |