diff --git a/init.el b/init.el index b51665e..dab3b1a 100644 --- a/init.el +++ b/init.el @@ -38,7 +38,7 @@ ;; Show matching parens (setq show-paren-delay 0) -(show-paren-mode 1) +(show-paren-mode 1) ;; Paragraph movement (global-set-key (kbd "s-j") 'forward-paragraph) @@ -183,16 +183,51 @@ :ensure t :commands lsp) (use-package lsp-ui - :commands lsp-ui-mode) + :commands lsp-ui-mode + :config + ((add-hook 'lsp-mode-hook 'lsp-ui-mode) + (add-hook 'haskell-mode-hook 'flycheck-mode))) (use-package company-lsp :commands company-lsp) (use-package lsp-haskell :defer t :ensure t - :init - (add-hook 'haskell-mode-hook #'lsp) - ) + :config + ((add-hook 'haskell-mode-hook #'lsp) + (setq lsp-haskell-process-path-hie "~/.local/bin/hie-wrapper"))) + +(use-package rust-mode + :defer t + :ensure t) + +;; Git Support +(use-package magit + :defer t + :ensure t) +(use-package evil-magit + :defer t + :ensure t) +(use-package helm-git-grep + :defer t + :ensure t) +(use-package helm-gitignore + :defer t + :ensure t) +(use-package git-commit + :defer t + :ensure t) +(use-package git-messenger + :defer t + :ensure t + :config + (define-key git-messenger-map [escape] 'git-messenger:popup-close)) +(use-package gitattributes-mode + :defer t) +(use-package gitconfig-mode + :defer t) +(use-package gitignore-mode + :defer t) ;; Custom keybinding (use-package general @@ -233,31 +268,48 @@ "at" '(ansi-term :which-key "open terminal") ;; Gtags "mgc" '(helm-gtags-create-tags - :which-key "Create tag db") + :which-key "create tag db") "mgd" '(helm-gtags-find-tag - :which-key "Find definitions") + :which-key "find definitions") "mgf" '(helm-gtags-select-path - :which-key "Jump to a file in tag db") + :which-key "jump to a file in tag db") "mgG" '(helm-gtags-dwim-other-window - :which-key "Jump to location based on context") + :which-key "jump to location based on context") "mgi" '(helm-gtags-tags-in-this-function - :which-key "Present tags in current function") + :which-key "present tags in current function") "mgl" '(helm-gtags-parse-file - :which-key "Jump to definitions in file") + :which-key "jump to definitions in file") "mgn" '(helm-gtags-next-history - :which-key "Jump to next location in context stack") + :which-key "jump to next location in context stack") "mgp" '(helm-gtags-previous-history - :which-key "Jump to previous location in context stack") + :which-key "jump to previous location in context stack") "mgr" '(helm-gtags-find-rtag - :which-key "Find references") + :which-key "find references") "mgR" '(helm-gtags-resume - :which-key "Resume previous helm-gtags session") + :which-key "resume previous helm-gtags session") "mgs" '(helm-gtags-select - :which-key "Select any tag in project retrieved by gtags") + :which-key "select any tag in project retrieved by gtags") "mgS" '(helm-gtags-show-stack - :which-key "Show stack of visited locations") + :which-key "show stack of visited locations") "mgu" '(helm-gtags-update-tags - :which-key "Create tag db") + :which-key "create tag db") + ;; Git key bindings + "gc" '(magit-clone :which-key "magit clone") + "gff" '(magit-find-file :which-key "magit find file") + "gfl" '(magit-log-buffer-file + :which-key "magit log buffer file") + "gfd" '(magit-diff-buffer-file-popup + :which-key "magit diff buffer file popup") + "gi" '(magit-init :which-key "magit initialize") + "gL" '(magit-list-repositories + :which-key "magit list repositories") + "gm" '(magit-dispatch-popup "magit dispatch popup") + "gs" '(magit-status "open Magit status buffer") + "gS" '(magit-stage-file "magit stage file") + "gU" '(magit-unstage-file "magit unstage file") + "g/" '(helm-git-grep :which-key "open helm git grep") + "g*" '(helm-git-grep-at-point + :which-key "open helm git grep at point") )) ;; Fancy titlebar for MacOS