rafalcieslak / emacs-company-terraform

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

Interpolation Bypasses Minimum Prefix Length #11

Open garrett-hopper opened 4 years ago

garrett-hopper commented 4 years ago

Is there a reason interpolation bypasses the minimum prefix length?

https://github.com/rafalcieslak/emacs-company-terraform/blob/2d11a21fee2f298e48968e479ddcaeda4d736e12/company-terraform.el#L173

It seems to be behaving strangely with the new 0.12 syntax. Perhaps in the past it made sense to start completing as soon as "${ was typed, however now with 0.12 it's strange to show completions as soon as [ is typed for variable assignment. (variable = [ starts showing all completions)

I propose changing it to:

         (`(interpolation . ,_)
          ;; (cons (car (last (split-string (nth 1 context) "\\."))) t)
          (car (last (split-string (nth 1 context) "\\.")))
          )