diff --git a/developers/Vagrantfile b/developers/Vagrantfile index 552bcffc..cbfde60b 100644 --- a/developers/Vagrantfile +++ b/developers/Vagrantfile @@ -7,12 +7,13 @@ Vagrant.configure("2") do |config| config.vm.define vm_name = 'vortex' config.vm.provision "file", source: "configs/docker.conf", destination: "/tmp/override.conf" + config.vm.provision "file", source: "configs/.vimrc", destination: "$HOME/.vimrc" config.vm.provision "shell", privileged: false, inline: <<-SHELL set -e -x -u sudo mkdir -p "/etc/systemd/system/docker.service.d/" sudo cp "/tmp/override.conf" "/etc/systemd/system/docker.service.d/override.conf" sudo apt-get update - sudo apt-get install -y vim git build-essential openvswitch-switch tcpdump unzip tig nfs-common + sudo apt-get install -y vim git cmake build-essential openvswitch-switch tcpdump unzip tig nfs-common # Env for proto PROTOC_RELEASE="https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip" PROTOC_TARGET="${HOME}/protoc" @@ -70,6 +71,18 @@ Vagrant.configure("2") do |config| if [ ! -d "${PROTOC_TARGET}" ]; then curl -fsSL "$PROTOC_RELEASE" > "${PROTOC_TARGET}.zip"; fi if [ -f "${PROTOC_TARGET}.zip" ]; then unzip "${PROTOC_TARGET}.zip" -d "${PROTOC_TARGET}"; fi go get -u github.com/golang/protobuf/{proto,protoc-gen-go} + + # install vim environment + git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim + vim +PluginInstall +qall + + # init YouCompleteMe vim plugin + sudo apt-get install -y python-dev python3-dev + cd ~/.vim/bundle/YouCompleteMe + ./install.py --go-completer + + # install govendor package manager + go get -u github.com/kardianos/govendor SHELL config.vm.network :private_network, ip: "172.17.8.100" diff --git a/developers/configs/.vimrc b/developers/configs/.vimrc new file mode 100644 index 00000000..1c7f4424 --- /dev/null +++ b/developers/configs/.vimrc @@ -0,0 +1,23 @@ +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +" alternatively, pass a path where Vundle should install plugins +"call vundle#begin('~/some/path/here') + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' +Plugin 'c9s/helper.vim' +Plugin 'c9s/treemenu.vim' +Plugin 'c9s/vikube.vim' +Plugin 'tpope/vim-fugitive' +Plugin 'c9s/hypergit.vim' +Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} +Plugin 'fatih/vim-go', {'do': ':GoInstallBinaries'} +Plugin 'Valloric/YouCompleteMe' +Plugin 'scrooloose/nerdtree' + +call vundle#end() " required +filetype plugin indent on " required