 ;; Formats python buffer with yapf
 ;; Install with: pip install git+https://github.com/google/yapf.git
 (use-package py-yapf :ensure t
-  :commands (py-yapf-enable-on-save)
+  :hook (python-mode . py-yapf-enable-on-save)
   :config
   (validate-setq py-yapf-options '("--style={based_on_style: google, indent_width: 2}")))
 


(bind-key "C-z" #'ar/dired-split-downloads-to-current)

;; Save current position to mark ring when jumping to a different place
(add-hook 'helm-goto-line-before-hook 'helm-save-current-pos-to-mark-ring)

;; Calendar client.
(use-package calfw :ensure t)


;; Easy access to links in buffer (using avy).
(use-package link-hint :ensure t)

(use-package bazel-mode
  :init
  (defun ar/bazel-mode-hook-fun ()
    (ar/buffer-run-for-saved-file-name "buildifier" "BUILD")
    (setq-local company-backends '(company-bazel company-rfiles)))
  :after company-grep
  :hook (bazel-mode . ar/bazel-mode-hook-fun))

(use-package use-host-package
  :config
