rafalcieslak / emacs-company-terraform

Company backend for terraform files
zlib License
37 stars 11 forks source link

how to extend autocompletion #7

Closed gentunian closed 5 years ago

gentunian commented 5 years ago

Hi, I'm trying to extend autocompletion from missing resources that this package actually have.

I found that company-terraform-data.el has what I want, but the following comment in that file made me think how data is autogenerated and that we should contribute in that:

;; THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.

So, how does autogeneration works?

Edit: found it :man_facepalming: https://github.com/rafalcieslak/emacs-company-terraform/blob/master/utils/generate.py Regards

gentunian commented 5 years ago

@rafalcieslak I'm working in something like this https://github.com/gentunian/terraform-autodoc in order to generate terraform docs based on go code. It's a work in progress. Maybe it could be useful to integrate in multiple projects.

rafalcieslak commented 5 years ago

For the record, terraform providers' documentation is not available in machine-readable format, uses very inconsistent layout, and is generally not friendly for automatic parsing. Thus the generate.py script has to deal with a lot of odd and unique cases, maintaining it is difficult, and its impossible to generalize it. I hope that the terraform community comes up with a more standardized way of documenting providers, but until that happens there isn't much I can do to improve this process.