按照Spacevim的安装方法正常安装,然后将下面的配置复制到
$HOME/.SpaceVim.d/init.vim
" Dark powered mode of SpaceVim, generated by SpaceVim automatically. let g:spacevim_realtime_leader_guide = 1 call SpaceVim#layers#load('incsearch') call SpaceVim#layers#load('lang#c') call SpaceVim#layers#load('lang#elixir') call SpaceVim#layers#load('lang#go') call SpaceVim#layers#load('lang#haskell') call SpaceVim#layers#load('lang#java') call SpaceVim#layers#load('lang#javascript') call SpaceVim#layers#load('lang#lua') call SpaceVim#layers#load('lang#perl') call SpaceVim#layers#load('lang#php') call SpaceVim#layers#load('lang#python') call SpaceVim#layers#load('lang#rust') call SpaceVim#layers#load('lang#swig') call SpaceVim#layers#load('lang#tmux') call SpaceVim#layers#load('lang#typescript') call SpaceVim#layers#load('lang#vim') call SpaceVim#layers#load('lang#xml') call SpaceVim#layers#load('shell') call SpaceVim#layers#load('tools#screensaver') let g:spacevim_enable_vimfiler_welcome = 1 let g:deoplete#auto_complete_delay = 150 let g:spacevim_enable_tabline_filetype_icon = 1 let g:spacevim_enable_os_fileformat_icon = 1 let g:spacevim_filemanager = 'nerdtree' let g:spacevim_buffer_index_type = 1 let g:neomake_vim_enabled_makers = [] if executable('vimlint') call add(g:neomake_vim_enabled_makers, 'vimlint') endif if executable('vint') call add(g:neomake_vim_enabled_makers, 'vint') endif if has('python3') let g:ctrlp_map = '' nnoremap <silent> <C-p> :Denite file_rec<CR> endif let g:clang2_placeholder_next = '' let g:clang2_placeholder_prev = ''
let g:spacevim_plugin_manager = 'dein' let g:spacevim_enable_ycm = 0 let g:spacevim_enable_guicolors = 1 let g:spacevim_vim_help_language = 'chinese' let g:rustfmt_autosave = 1 let g:spacevim_colorscheme_bg = 'dark' "let g:ycm_rust_src_path = '$HOME/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src' "let g:deoplete#sources#rust#racer_binary='$HOME/.cargo/bin/racer' "let g:deoplete#sources#rust#rust_source_path='$HOME/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src'
let g:spacevim_custom_plugins = [ \ ['cespare/vim-toml', {'on_ft' : 'toml'}], \ ['dag/vim-fish', {'on_ft': 'sh'}], \ ['ponko2/deoplete-fish', {'on_ft': 'sh'}], \ ['dart-lang/dart-vim-plugin', {'on_ft': 'dart'}], \ ['villainy/deoplete-dart', {'on_ft': 'dart'}], \ ['sebastianmarkow/deoplete-rust', {'on_ft': 'rs'}], \ ['udalov/kotlin-vim', {'on_ft': 'kt'}], \ ['vmchale/ion-vim', {'on_ft': 'ion'}], \ ['vim-scripts/bufexplorer.zip'], \ ['autozimu/LanguageClient-neovim'], \ ['Shougo/deol.nvim'], \ ['nsf/gocode', {'on_ft': 'go'}], \ ['junegunn/fzf'], \ ['roxma/nvim-completion-manager'] \ ]
" Automatically start language servers. let g:LanguageClient_autoStart = 1 set hidden
let g:LanguageClient_serverCommands = { \ 'rust': ['rustup', 'run', 'nightly', 'rls'], \ }
:set hidden :set noswapfile let g:spacevim_guifont = 'Ubuntu\ Mono:h12' let g:go_fmt_autosave = 1 let g:tsuquyomi_completion_detail = 1 let g:tsuquyomi_disable_quickfix = 1 let g:syntastic_typescript_checkers = ['tsuquyomi'] " You shouldn't use 'tsc' checker. let g:chromatica#libclang_path='/usr/lib/llvm-4.0/lib' unmap <C-i> noremap <F9> :Deol<CR>
然后在shell里
cd ~/.cache/vimfiles/repos/github.com/autozimu/LanguageClient-neovim
make release
启动nvim或者vim
:UpdateRemotePlugins
:SPUpdate
效果图如下:支持自动rustfmt, 还有错误检查
评论区
写评论我运行后,提示已经有了。是哪出问题了?
$ pip3 install neovim Requirement already satisfied: neovim in ./Library/Python/3.6/lib/python/site-packages
Requirement already satisfied: msgpack-python>=0.4.0 in ./Library/Python/3.6/lib/python/site-packages (from neovim)
Requirement already satisfied: greenlet in ./Library/Python/3.6/lib/python/site-packages (from neovim)
忘了说了,pip3 install neovim
我MacOS 10.13.2 neovim最新版本,安装你配置的,提示下面这个:
$ nvim LanguageClient: Not executable! Press ENTER or type command to continue
按回车后,下面提示:
Error detected while processing function 241_on_core_channel_error: line 1: Traceback (most recent call last):@ File "/Users/reclusemac/.cache/vimfiles/.cache/init.vim/.dein/pythonx/cm_start.py", li ne 9, in @ from neovim import attach, setup_logging^@ImportError: No module named 'neovim'^@
vscode 不折腾
心动不如行动, 0块钱你买不了吃亏和上当!
心动了~~