        Make sure you don't have other gofmt/goimports hooks enabled."
       (add-hook 'before-save-hook 'lsp-format-buffer t t)
       (add-hook 'before-save-hook 'lsp-organize-imports t t))
-    (add-hook 'go-mode 'chri/lsp-go-install-save-hooks)
+    (unless chri/prefer-eglot
+      (add-hook 'go-mode 'chri/lsp-go-install-save-hooks))
     :mode "\\.go\\'")
   (use-package go-playground
     :if (executable-find "go")

    (which-key-mode))
  ;; chri/proglang branch:

  ;; LSP mode.
  (use-package lsp-mode
    :init
    (setq lsp-keymap-prefix "s-l")
    :hook ((python-mode . lsp)
           (c++-mode . lsp)
           (c-mode .lsp)
           (go-mode . lsp))
    ;; rebind C-M-.
    :bind (:map lsp-mode-map ("C-M-." . lsp-find-references))
    :commands lsp)
  (use-package lsp-ivy
    :after lsp-mode)
  (use-package lsp-ui
    :commands lsp-ui-mode
    :after lsp-mode)
  (use-package lsp-treemacs
    :after lsp-mode
    :commands lsp-treemacs-errors-list
    :bind (:map lsp-mode-map
                ("s-t s" . lsp-treemacs-symbols)
                ("s-t r" . lsp-treemacs-references)))
  (use-package dap-mode
    :defer t
    :after lsp-mode
    :init
    (require 'dap-python))

  ;; Enable which-key for learing new keybindings:
  (use-package which-key


  (when chri/enable-tabnine
    ;; Tabnine for AI completion
    (customize-set-variable 'lsp-completion-provider :none)
    (use-package company-tabnine
      :hook (python-mode . chri/tabnine-on))
    (defun chri/tabnine-off ()
      "turn off TabNine for this buffer"
      (interactive)
