Open3
自PC内のVim環境整備
ゴール
vim
できちんと補完の効くIDEを構築する
前提
- まっさらな状態からスタート
- vim-bootstrapを土台にする
- Python, JS(TS), Nimまでは補完をサポートしてほしい
- Golang,Cあたりはシンタックスハイライトだけでも欲しい
vimの設定に関しては、Ansibleのロールがある(というか作ってる)ので、これを利用する。
- role: attakei.vim_bootstrap
vim_command: vim
vim_langs:
- c
- go
- html
- javascript
- python
- typescript
vim_theme: molokai
vim_additional_plugins:
- editorconfig/editorconfig-vim
- cespare/vim-toml
- zah/nim.vim
- prabirshrestha/vim-lsp
- prabirshrestha/asyncomplete.vim
- prabirshrestha/asyncomplete-lsp.vim
- mattn/vim-lsp-settings
LSPの入手
vim-lsp-settingsプラグインを使っているため、基本的には :LspInstall
で入手できる。
nimlsp
Archlinux のnimパッケージには一部ファイルが無いため、nimlspのビルドができない。
そのため、そのため全ソースを用意する必要がある。
$ mkdir ~/vendor
$ wget https://nim-lang.org/download/nim-1.4.4.tar.xz
$ tar fx nim-1.4.4.tar.xz
$ cd $HOME/.local/share/vim-lsp-settings/servers
$ git clone https://github.com/PMunch/nimlsp.git
$ cd nimlsp
$ nimble -y -d:explicitSourcePath=$HOME/vendor/nim-1.4.4 build