summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2019-06-26 16:48:12 +0100
committerGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2019-06-26 17:19:40 +0100
commit3e3df1ef547ec330f1d8d582cd8f69e459e5384d (patch)
treeba51bf23779e2be2f4dd44cb928ff7d9ab7cad16 /init.el
parentuse web-mode for TT (diff)
downloademacs-3e3df1ef547ec330f1d8d582cd8f69e459e5384d.tar.gz
emacs-3e3df1ef547ec330f1d8d582cd8f69e459e5384d.tar.bz2
emacs-3e3df1ef547ec330f1d8d582cd8f69e459e5384d.zip
tramp autocomplete for go2 and vagrant (cached)
Diffstat (limited to 'init.el')
-rwxr-xr-xinit.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/init.el b/init.el
index e8f61bc..a41b2b9 100755
--- a/init.el
+++ b/init.el
@@ -412,3 +412,15 @@
(add-to-list 'auto-mode-alist '("\\.tt$" . web-mode))
+(require 'go2-tramp)
+(require 'vagrant-tramp)
+
+(defun dakkar-cache-vagrant (orig &rest args)
+ (let ((repo (pcache-repository "vagrant-tramp"))
+ (key 'all-boxes))
+ (if (pcache-has repo key)
+ (pcache-get repo key)
+ (let ((value (apply orig args)))
+ (pcache-put repo key value 300)
+ value))))
+(advice-add 'vagrant-tramp--all-boxes :around #'dakkar-cache-vagrant)