Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*.tfvars file not showing syntax coloring #148

Closed
ubenmackin opened this issue Jun 9, 2020 · 2 comments
Closed

*.tfvars file not showing syntax coloring #148

ubenmackin opened this issue Jun 9, 2020 · 2 comments

Comments

@ubenmackin
Copy link

ubenmackin commented Jun 9, 2020

Server Version

terraform-ls --version
0.3.2

Terraform Version

terraform -v
Terraform v0.12.26

Client Version

VSCode on Windows 10 with the new terraform extension (2.0.0-rc2)

Terraform Configuration Files

local.tfvars

// Environment variables
environment       = "dev"
subscription_id   = "XXXXXXXXXXXXXXXXXXXXXX"
azure_developer   = "XXXXX@XXXXX.com"

// This name is applied to all resources created
prefix = "myprefix"

// First is Primary and second is Backup
instance        = ["primary", "secondary"]
instance_short  = ["1", "2"]
location        = ["East US", "West US"]
timezone        = ["Eastern Standard Time", "Pacific Standard Time"]
location_alt    = ["eastus", "westus"]
rg_count        = 1 // 1 or 2; 1 builds a single primary RG, 2 builds primary and secondary

Log Output

N.A.

Expected Behavior

Syntax coloring should work

Actual Behavior

.tfvars file isn't recognized by the language server. There is no indication in the logs that is trying to read the file, almost as if the file type isn't picked up as a valid one.

Steps to Reproduce

  1. Open a folder in IDE
  2. Open a file name local.tfvars
  3. No syntax coloring is observed.
@radeksimko
Copy link
Member

Hi @ubenmackin
Thank you for trying out the release candidate of the extension.

Generally syntax highlighting is done on the client side - i.e. by the extension directly, so that's not something server could implement (yet) as the LSP (protocol used between client/IDE and the server) doesn't specify that. There is a PR which should enable syntax highlighting of tfvars: hashicorp/vscode-terraform#349

As for the language server features related to tfvars - I believe this is already covered under #50

With that in mind I'm going to close this issue in favour of the linked one and the PR.

@ghost
Copy link

ghost commented Jul 9, 2020

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 context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants