Update emacs init.el configuraiton
Add LSP and git support and some cleanup. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
1dd9f52eee
commit
ff7b923738
1 changed files with 70 additions and 18 deletions
88
init.el
88
init.el
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
;; Show matching parens
|
;; Show matching parens
|
||||||
(setq show-paren-delay 0)
|
(setq show-paren-delay 0)
|
||||||
(show-paren-mode 1)
|
(show-paren-mode 1)
|
||||||
|
|
||||||
;; Paragraph movement
|
;; Paragraph movement
|
||||||
(global-set-key (kbd "s-j") 'forward-paragraph)
|
(global-set-key (kbd "s-j") 'forward-paragraph)
|
||||||
|
@ -183,16 +183,51 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands lsp)
|
:commands lsp)
|
||||||
(use-package lsp-ui
|
(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
|
(use-package company-lsp
|
||||||
:commands company-lsp)
|
:commands company-lsp)
|
||||||
|
|
||||||
(use-package lsp-haskell
|
(use-package lsp-haskell
|
||||||
:defer t
|
:defer t
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:config
|
||||||
(add-hook 'haskell-mode-hook #'lsp)
|
((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
|
;; Custom keybinding
|
||||||
(use-package general
|
(use-package general
|
||||||
|
@ -233,31 +268,48 @@
|
||||||
"at" '(ansi-term :which-key "open terminal")
|
"at" '(ansi-term :which-key "open terminal")
|
||||||
;; Gtags
|
;; Gtags
|
||||||
"mgc" '(helm-gtags-create-tags
|
"mgc" '(helm-gtags-create-tags
|
||||||
:which-key "Create tag db")
|
:which-key "create tag db")
|
||||||
"mgd" '(helm-gtags-find-tag
|
"mgd" '(helm-gtags-find-tag
|
||||||
:which-key "Find definitions")
|
:which-key "find definitions")
|
||||||
"mgf" '(helm-gtags-select-path
|
"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
|
"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
|
"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
|
"mgl" '(helm-gtags-parse-file
|
||||||
:which-key "Jump to definitions in file")
|
:which-key "jump to definitions in file")
|
||||||
"mgn" '(helm-gtags-next-history
|
"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
|
"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
|
"mgr" '(helm-gtags-find-rtag
|
||||||
:which-key "Find references")
|
:which-key "find references")
|
||||||
"mgR" '(helm-gtags-resume
|
"mgR" '(helm-gtags-resume
|
||||||
:which-key "Resume previous helm-gtags session")
|
:which-key "resume previous helm-gtags session")
|
||||||
"mgs" '(helm-gtags-select
|
"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
|
"mgS" '(helm-gtags-show-stack
|
||||||
:which-key "Show stack of visited locations")
|
:which-key "show stack of visited locations")
|
||||||
"mgu" '(helm-gtags-update-tags
|
"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
|
;; Fancy titlebar for MacOS
|
||||||
|
|
Loading…
Reference in a new issue