-
Notifications
You must be signed in to change notification settings - Fork 135
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
terraform: Report uninitialized workspace #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think this might have broke some things.
What is there to initialize? Nothing! Consider, typing and as such triggering completion in said
|
Generally the language server needs to have data to use for completion and any other future functionality (like hover). There is not much the LS can do without it yet. That said we shouldn't be treating the schema availability as essential and that is tracked under - #83 I'm going to lock this PR because it's unrelated to the issue being discussed. Please file a new one if you believe this isn't covered in #83 Thank you! |
This improves the UX a little bit when user tries to open a directory which has not been
terraform init
'd.Before
After
The log messages differ slightly as this build also includes some other patches.
How and whether the error from
initialize
is surfaced on the client depends on client implementation and we could in theory publish diagnostics to inform the user that way.Regardless though I think we first need change the reporting of such errors to avoid blocking initialization and still provide reduced functionality - then perhaps we can publish warning informing the user of reduced functionality.
#83