 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; this should probably be cleaned up to not use mode hooks to manipulate company-backends
 
-(add-hook 'after-init-hook 'global-company-mode)
-(setq company-idle-delay 0)
-;;  (company-quickhelp-mode 1)
 (add-hook 'darwin-system-type-hook
   (lambda ()
     (setq company-c-headers-path-system

(use-package rust-mode       :ensure t)
(use-package yaml-mode       :ensure t)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; low tech manual configuration

;;; theme
(load-theme 'indoors t)

;;; ui stuff

;; don't show startup screen in gui mode
(setq inhibit-startup-screen t)
;; show only column numbers along the bottom

(use-package jedi
  :ensure t
  :hook   (python-mode . 'jedi:setup)
  :custom (jedi:complete-on-dot t))

(use-package linum
  :config (global-linum-mode t)
  :custom (linum-format "%3d| "))

(use-package rainbow-delimiters
  :ensure t
  :hook   (prog-mode . rainbow-delimiters-mode))

(use-package undo-tree
  :ensure   t
  :diminish undo-tree-mode
  :config   (global-undo-tree-mode))

(use-package whitespace
  :diminish global-whitespace-mode
  :config   (global-whitespace-mode)
  :custom   (whitespace-style '(face lines-tail))
  :hook     ((prog-mode .    (lambda () (setq show-trailing-whitespace 1)))
              (c-mode .      (lambda () (setq whitespace-line-column 80)))
              (c++-mode .    (lambda () (setq whitespace-line-column 80)))
              (elixir-mode . (lambda () (setq whitespace-line-column 80)))
              (java-mode .   (lambda () (setq whitespace-line-column 100)))
              (python-mode . (lambda () (setq whitespace-line-column 79)))
              (rust-mode .   (lambda () (setq whitespace-line-column 99)))))

(use-package windmove
  :config (windmove-default-keybindings)
  :custom (shift-select-mode nil))

;; language support
(use-package cython-mode     :ensure t)
