juliosueiras / vim-terraform-completion

A (Neo)Vim Autocompletion and linter for Terraform, a HashiCorp tool
MIT License
337 stars 24 forks source link

Docker support for testing vim plugin #14

Closed ccampanale closed 7 years ago

ccampanale commented 7 years ago
ccampanale commented 7 years ago

So I started on what you mentioned. It's mostly working but there is an error getting the function to work... Not sure why just yet but I figured I toss this out.

./test-vim-terraform-completion will build/run the image opening vim against a new document test.tf.

ccampanale commented 7 years ago

Oh, and I added terraform to the image which makes it significantly larger as I wondered if that was why I was getting the error but it didn't help. Up to you if you want to keep it there for testing the linting stuff.

The error I'm getting right now is: E117: Unknown function: terraformcomplete#Complete when I try to use Omni completion. I'm a super novice with Vim so I'm sure you know exactly what the issue is. haha

juliosueiras commented 7 years ago

Currently reviewing it

juliosueiras commented 7 years ago
FROM base/archlinux
USER root
WORKDIR /root
ADD example.vimrc .vimrc
RUN pacman -Syy && pacman -S vim ruby git unzip --noconfirm
RUN curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && vim +PlugInstall +qall
RUN curl https://releases.hashicorp.com/terraform/0.9.4/terraform_0.9.4_linux_amd64.zip -o terraform_0.9.4_linux_amd64.zip && unzip terraform_0.9.4_linux_amd64.zip && mv terraform /usr/bin/terraform
ENTRYPOINT ["vim"]
ccampanale commented 7 years ago

Made the changes you suggested and it appears to work great! Take a look when you get a chance.