Closed j3ffrw closed 2 years ago
completion fails, with unknown language id "tf" in the logs
I don't know all the implementation details of coc.nvim
plugin myself but generally speaking the language server expects and supports two documented language IDs - terraform
and terraform-vars
. Language ID is usually implied from the file extension, but it is a different and not interchangeable concept, so if for any reason the editor ends up sending tf
instead of terraform
then that's a problem that will need rectifying there (on the editor/client side).
Before we start digging into the client code, can you share your configuration and/or confirm it matches https://github.com/hashicorp/terraform-ls/blob/main/docs/USAGE.md#cocnvim ?
Thanks!
As a side note NeoVIM 0.5.0+ has a builtin language client which may be easier to configure, see https://github.com/hashicorp/terraform-ls/blob/main/docs/USAGE.md#neovim-v050
Thank you for the additional info about language id, I manage to fix it in vim by using
set ft=terraform
but ended up installing 'hashivim/vim-terraform' w/c does the above and a lot more. Works with 0.26.0 too.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Server Version
Terraform Version
Client Version
Terraform Configuration Files
Log Output
Expected Behavior
completion should work
Actual Behavior
completion fails, with unknown language id "tf" in the logs
Steps to Reproduce
vim test.tf
in a terraform project