 (use-package yasnippet)
 
 (use-package lsp-mode
-  :preface
-  (setq lsp-keymap-prefix "C-l")
+  :init
+  (setq lsp-keymap-prefix "M-SPC l")
   :custom
   (lsp-rust-server 'rust-analyzer)
   (lsp-prefer-capf t)
-  :hook ((prog-mode . lsp)
+  :hook ((prog-mode . direnv-update-environment)
+	 (prog-mode . lsp-deferred)
 	 (lsp-mode . lsp-enable-which-key-integration)
 	 ;; (before-save . lsp-format-buffer)
 	 ;; (before-save . lsp-organize-imports)

(fset 'yes-or-no-p 'y-or-n-p)

(use-package direnv
  :custom
  (direnv-always-show-summary nil)
  :hook
  (prog-mode-hook . #'direnv-update-environment)
  :config
  (direnv-mode))


  ("C-c i" . magit-status))

(use-package git-commit			;TODO (spell)
  :hook (git-commit-setup . git-commit-turn-on-flyspell))

(use-package git-timemachine)

