3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【忘備録】NeovimでRustの最小限の環境設定

Last updated at Posted at 2019-07-10

環境設定に戸惑ったので自分用に忘備録。LSP(Language Server Protocol)ale を用いて RLS(Rust Language Server) を呼び出す。
rust-lang/rust.vimracer-rust/vim-racer のプラグインは使わない。

init.vim

" プラグイン管理: vim-plugの場合
call plug#begin('~/.config/nvim/plugged')
Plug 'w0rp/ale'
call plug#end()

" 環境変数
let g:ale_fixers = {                     " rustfmtで整形
    \ 'rust': ['rustfmt']
    \ }
let g:ale_linters = {                   " リンタにRLSを使用
    \ 'rust': ['rls']
    \ }
let g:ale_rust_rls_toolchain = 'stable' " toolchainの指定
let g:ale_completion_enabled = 1        " 自動補完を有効
let g:ale_fix_on_save = 1               " 保存時に自動整形

追記(2019/7/31)

deopleteがaleと衝突して不具合を起こしていたようなのでaleのみの使用にしました

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?