Skip to content

coc and terraform-lsp does not work as expected  #93

@vhristev

Description

@vhristev

There is no provider auto-completion how it's shown in the project example video.

by default 2021-02-11 at 17 53 44

~/Desktop/terraform-test/terraform/environmnet/test » ls -la
total 16
drwxr-xr-x  5 vhristev  _lpoperator   160 Feb 11 18:08 .
drwxr-xr-x  3 vhristev  _lpoperator    96 Feb 11 17:39 ..
drwxr-xr-x  3 vhristev  _lpoperator    96 Feb 11 17:40 .terraform
-rw-r--r--  1 vhristev  _lpoperator  1002 Feb 11 17:48 .terraform.lock.hcl
-rw-r--r--  1 vhristev  _lpoperator    29 Feb 11 17:48 main.tf
~ » nvim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPAC

K_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/build/config -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/src -I/usr/local/include -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/deps-build/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/build/src/nvim/auto -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/build/include
Compiled by brew@Catalina

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.4/share/nvim"

Run :checkhealth for more info

Terraform-lsp - i tried with Beta1 Beta2 and older versions.

I can see LSP server is runnig

~ » ps aux | grep terr
vhristev         76420   0.6  0.0  4399240  12712   ??  S     5:49PM   0:00.06 terraform-lsp

coc settings( there is extr } to close entire config )

    // python
    "python.jediEnabled": false,
    // add your languageServer into this list
    "languageserver": {
                "terraform": {
                        "command": "terraform-lsp",
                        "filetypes": [
                                "terraform",
                                "tf"
                        ],
                        "initializationOptions": {},
                        "settings": {}
                }
        }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions