vim-ref-clojuredocs is a plugin for searching Clojure documentation from https://clojuredocs.org/ . Since it uses https://clojuredocs.org/clojuredocs-export.json as a reference, it does not need to run REPL.
vim-plug:
Plug 'thinca/vim-ref'
Plug 'nanonanomachine/vim-ref-clojuredocs'
markdown
syntax is supported- You can use
markdown
syntax via sheerun/vim-polyglot or plasticboy/vim-markdown
- You can use
curl
is installed- https://github.com/thinca/vim-ref is installed
Press K
on the function you want to check the document, or run the following command:
:Ref clojuredocs <function>
If you use clojure plugins such as liquidz/vim-iced or tpope/vim-fireplace and use their default key mappings, vim-ref's default key mapping K
will be overwritten. You need to disable their default key mappings or reassign vim-ref's key map as follows:
" Workaround for overwritten the default key mapping
silent! nmap <silent> <unique> KK <Plug>(ref-keyword)
silent! xmap <silent> <unique> KK <Plug>(ref-keyword)
liquidz/vim-iced will not assign a mapping if there's an already <Plug>
mapping.
You can disable K
mapping as follows:
nmap <Nop>(disable_document_popup_open) <Plug>(iced_document_popup_open)
- Fix the behavior that another buffer will open if we ref twice
- Set an expiration date for a cached json file
- Check the name space if there are multiple candidates (if possible)