juliosueiras / vim-terraform-completion

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

Need better documentation on how to get up and running with this plugin #45

Closed scsinutz closed 6 years ago

scsinutz commented 6 years ago

I followed your installation instructions for neovim but auto-completion doesn't seem to work.

:PlugStatus
- vim-terraform: OK                                                                                  
- vim-terraform-completion: OK                                                                                                                                           
- syntastic: OK
juliosueiras commented 6 years ago

can you paste the result for :CheckHealth ?

scsinutz commented 6 years ago

Sure, here it is:

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='iTerm.app'
  - INFO: $COLORTERM='truecolor'

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Executable: /usr/local/bin/python2
  - INFO: Python2 version: 2.7.15
  - INFO: python2-neovim version: 0.2.6
  - OK: Latest python2-neovim is installed: 0.2.6

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /usr/local/bin/python3
  - INFO: Python3 version: 3.7.0
  - INFO: python3-neovim version: 0.2.6
  - OK: Latest python3-neovim is installed: 0.2.6

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
  - INFO: Host: /usr/local/bin/neovim-ruby-host
  - OK: Latest "neovim" gem is installed: 0.7.1

## Node.js provider (optional)
  - INFO: Node.js: v4.4.6
  - WARNING: Neovim node.js host does not support v4.4.6
juliosueiras commented 6 years ago

and lastly, can you post the portion of your init.vim that is related to the plugin?

On Wed, Jul 11, 2018 at 5:36 PM, Patrick McDonald notifications@github.com wrote:

Sure, here it is: Performance

  • OK: Build type: Release

Remote Plugins

  • OK: Up to date

terminal

  • INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  • INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  • INFO: $TERM_PROGRAM='iTerm.app'
  • INFO: $COLORTERM='truecolor'

health#provider#check Clipboard (optional)

  • OK: Clipboard tool found: pbcopy

Python 2 provider (optional)

  • INFO: g:python_host_prog is not set. Searching for python2 in the environment.
  • INFO: Executable: /usr/local/bin/python2
  • INFO: Python2 version: 2.7.15
  • INFO: python2-neovim version: 0.2.6
  • OK: Latest python2-neovim is installed: 0.2.6

Python 3 provider (optional)

  • INFO: g:python3_host_prog is not set. Searching for python3 in the environment.
  • INFO: Executable: /usr/local/bin/python3
  • INFO: Python3 version: 3.7.0
  • INFO: python3-neovim version: 0.2.6
  • OK: Latest python3-neovim is installed: 0.2.6

Ruby provider (optional)

  • INFO: Ruby: ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
  • INFO: Host: /usr/local/bin/neovim-ruby-host
  • OK: Latest "neovim" gem is installed: 0.7.1

Node.js provider (optional)

  • INFO: Node.js: v4.4.6
  • WARNING: Neovim node.js host does not support v4.4.6

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/juliosueiras/vim-terraform-completion/issues/45#issuecomment-404318288, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgoLrwOb1IU27-qm6NYvB_50zDD4RG5ks5uFm_OgaJpZM4VLsTx .

scsinutz commented 6 years ago

Fresh install of neovim specifically to use this plugin. I'm using the init.vim from the install instructions.

" Minimal Configuration
set nocompatible
syntax on
filetype plugin indent on

call plug#begin('~/.local/share/nvim/site/plugged/')

" (Optinal) for Tag Sidebar
" Plug 'majutsushi/tagbar'

Plug 'hashivim/vim-terraform'
Plug 'vim-syntastic/syntastic'
Plug 'juliosueiras/vim-terraform-completion'
call plug#end()

" Syntastic Config
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

" (Optional)Remove Info(Preview) window
set completeopt-=preview

" (Optional)Hide Info(Preview) window after completions
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif

" (Optional) Enable terraform plan to be include in filter
let g:syntastic_terraform_tffilter_plan = 1

" (Optional) Default: 0, enable(1)/disable(0) plugin's keymapping
let g:terraform_completion_keys = 1

" (Optional) Default: 1, enable(1)/disable(0) terraform module registry completion
let g:terraform_registry_module_completion = 0
juliosueiras commented 6 years ago

can you repeat the action from this and see if completion will work?

https://asciinema.org/a/jE1Gu6JNrQBddgd9CuOAMJWL3

On Wed, Jul 11, 2018 at 5:43 PM, Patrick McDonald notifications@github.com wrote:

Fresh install of neovim specially to use this plugin. I'm using the init.vim from the install instructions.

" Minimal Configuration set nocompatible syntax on filetype plugin indent on

call plug#begin('~/.local/share/nvim/site/plugged/')

" (Optinal) for Tag Sidebar " Plug 'majutsushi/tagbar'

Plug 'hashivim/vim-terraform' Plug 'vim-syntastic/syntastic' Plug 'juliosueiras/vim-terraform-completion' call plug#end()

" Syntastic Config set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%*

let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0

" (Optional)Remove Info(Preview) window set completeopt-=preview

" (Optional)Hide Info(Preview) window after completions autocmd CursorMovedI if pumvisible() == 0|pclose|endif autocmd InsertLeave if pumvisible() == 0|pclose|endif

" (Optional) Enable terraform plan to be include in filter let g:syntastic_terraform_tffilter_plan = 1

" (Optional) Default: 0, enable(1)/disable(0) plugin's keymapping let g:terraform_completion_keys = 1

" (Optional) Default: 1, enable(1)/disable(0) terraform module registry completion let g:terraform_registry_module_completion = 0

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/juliosueiras/vim-terraform-completion/issues/45#issuecomment-404320114, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgoLilnUsqdtD-673tl66nMHqGyydm8ks5uFnF6gaJpZM4VLsTx .

scsinutz commented 6 years ago

gem install neovim Did the trick.

It doesnt auto-complete as I type, I have to press ctrl+x or ctrl+o to get a drop down list of options. Is that how it's designed?

juliosueiras commented 6 years ago

correct, if you want async completion, you can try out deoplete(which this plugin support as well)

On Wed, Jul 11, 2018 at 6:16 PM, Patrick McDonald notifications@github.com wrote:

gem install neovim Did the trick.

It doesnt auto-complete as I type, I have to press ctrl+x or ctrl+o to get a drop down list of options. Is that how it's designed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/juliosueiras/vim-terraform-completion/issues/45#issuecomment-404328094, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgoLgqAhTit61C-MXCw3OB1sS5XjGpiks5uFnlQgaJpZM4VLsTx .

scsinutz commented 6 years ago

Thank you!