Ⅰ. 插件描述
Async Clojure Completion for various (n)vim completion enginesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'clojure-vim/async-clj-omni-without-it'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'clojure-vim/async-clj-omni-without-it'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'clojure-vim/async-clj-omni-without-it'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/clojure-vim/async-clj-omni
Ⅳ. 文档说明
# clj-async.nvim
Provides async clojure completion for:
- [deoplete.nvim][]
- [ncm2][]
- [asyncomplete.vim][]
- [coc.nvim][]
Trying to use Fireplace's omnicompletion with auto-complete is painfully
slow at times, making typing blocked. Using this module will be faster as
it does not block, it runs in it's own thread.
Installation
CIDER
For this plugin to work, your nREPL must have CIDER available. You can install it for lein and boot.
Deoplete
Follow the install instructions for [deoplete.nvim][]. Then just include with
your favourite plugin manager, mine is [vim-plug][]
Plug 'clojure-vim/async-clj-omni'You also need to include the following line in your init.vim:
call deoplete#custom#option('keyword_patterns', {'clojure': '[\w!$%&*+/:<=>?@\^_~\-\.#]*'})Nvim Completion Manager 2
- Follow the install instructions for [ncm2][].
Add this plugin using your favourite plugin manager,
Plug 'clojure-vim/async-clj-omni'
asyncomplete.vim
Registration:
au User asyncomplete_setup call asyncomplete#register_source({
\ 'name': 'async_clj_omni',
\ 'whitelist': ['clojure'],
\ 'completor': function('async_clj_omni#sources#complete'),
\ })coc.nvim
- Follow the install instructions for [coc.nvim][].
Add this plugin using your favourite plugin manager,
Plug 'clojure-vim/async-clj-omni'
Developing
Deoplete
A few snippets and tidbits for development:
:call deoplete#custom#set('async_clj', 'debug_enabled', 1)
:call deoplete#enable_logging("DEBUG", "/tmp/deopletelog")Then you can this command to watch debug statements:
$ tail -f /tmp/deopletelogDebug statements can be made in the source via:
self.debug(msg)Nvim Completion Manager
NVIM_PYTHON_LOG_FILE=logfile NVIM_PYTHON_LOG_LEVEL=DEBUG nvimFAQ
- Why do you include [nrepl-python-client][] via submodule.
I made the decision that it was more complex to have users try and manage a
version of [nrepl-python-client][], than it was for them to "just" have it
- In an ideal world, I'd be able to use virtualenv with the
Python/Neovim, but this isn't currently a realistic expectation for all
users to be able to use.