Skip to content

Instantly share code, notes, and snippets.

@syusui-s
Last active March 21, 2018 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syusui-s/3536c227bc54a14736020d51b3ab2f9d to your computer and use it in GitHub Desktop.
Save syusui-s/3536c227bc54a14736020d51b3ab2f9d to your computer and use it in GitHub Desktop.
NeoVimで使ってるRust関連のプラグイン
## TOML for Cargo.toml
[[plugins]]
repo = 'cespare/vim-toml'
on_ft = 'toml'
## Rust
### rust-lang/rust.vim : Vim configuration and syntax highlight for Rust.
[[plugins]]
repo = 'rust-lang/rust.vim'
on_ft = 'rust'
### sebastianmarkow/deoplete-rust
[[plugins]]
repo = 'sebastianmarkow/deoplete-rust'
depends = ['deoplete.nvim']
on_ft = 'rust'
hook_add = '''
let s:racer_binaries = [
\ $HOME . "/.cargo/bin/racer",
\ ]
let s:rust_sources = [
\ $HOME . "/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src"
\ ]
for s:racer_binary in s:racer_binaries
if filereadable(s:racer_binary)
let g:deoplete#sources#rust#racer_binary = s:racer_binary
break
endif
endfor
for s:rust_source in s:rust_sources
if isdirectory(s:rust_source)
let g:deoplete#sources#rust#rust_source_path = s:rust_source
break
endif
endfor
'''
# ### racer-rust/vim-racer
# [[plugins]]
# repo = 'racer-rust/vim-racer'
# on_ft = 'rust'
### Open rust document
# [[plugins]]
# repo = 'rhysd/rust-doc.vim'
# on_ft = 'rust'
# hook_add = '''
# let g:rust_doc#downloaded_rust_doc_dir = $HOME . '/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
# '''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment