Closed dimbleby closed 4 years ago
@pgporada it occurs to me that this proposes to remove quite a lot of code that you must have written - maybe you're attached to it!
Seriously, please shout if you've any concerns about this approach.
Else: I've been using this for the last couple of weeks and am happy with it, so will likely merge soon.
Remove all the keywords for known resources and data sources.
Obviously this means that these items don't get special highlighting any more; but that's not unreasonable: a syntax file's job is to recognise the syntax, not the semantic meaning. It should be up to a linter, or
terraform validate
, to spot syntactically correct typos etc. Besides which, this was always a bit half-hearted: why not also recognise providers, for instance, if we're going to recognise their resources?In exchange for this we get to remove thousands of lines from the syntax file, and also to make maintenance a good deal simpler - because we no longer have to go and download all the known providers and parse their resources and data sources. (And sometimes providers do restructure their codebase so that this code itself needs fixing).
I'll leave this to sit around for a while, perhaps some people think that the highlighting of resources and data sources is important and if so let's give them a chance to say so.