         gofmt-command "goimports")
   (add-hook 'before-save-hook 'gofmt-before-save)
   (setq go-mode-hook (lambda ()
+                       (evil-define-key 'normal go-mode-map (kbd "C-]") 'godef-jump)
+                       (evil-define-key 'normal go-mode-map (kbd "K") 'godef-describe)
                        (setq imenu-generic-expression
                              '((nil "func *\\(.*\\) {" 1)))
                        (go-eldoc-setup)

  (or (locate-dominating-file default-directory ".git")
      (default-directory)))

(defun my/flycheck-list-errors-only-when-errors ()
  (if flycheck-current-errors
      (flycheck-list-errors)
    (-when-let (buffer (get-bufferflycheck-error-list-buffer))
      (dolist (window (get-buffer-window-list buffer))
        (quit-window nil window)))))

(defun my/next-error ()
  (interactive)
  (condition-case nil (next-error)

;; Line spacing
(setq-default line-spacing 3)
;; Font
(defvar my/font "Liberation Mono 12")
(set-face-attribute 'default nil :font my/font)
(set-frame-font my/font nil t)
;; Set key bindings
(add-hook 'after-init-hook 'my/key-bindings)
;; FZF
(add-hook 'after-init-hook 'my/fzf-init)
;; Centered window mode
(add-hook 'after-init-hook 'centered-window-mode)

;; Packages
(require 'package)
