diff --git a/init.el b/init.el index 4329265..b51665e 100644 --- a/init.el +++ b/init.el @@ -1,5 +1,7 @@ -;;; Package configs +;;; init.el --- Initialization file for emacs +;;; Commentary: Emacs startup file --- initialization file for emacs (require 'package) + (setq package-enable-at-startup nil) (setq package-archives '(("org" . "http://orgmode.org/elpa/") @@ -67,7 +69,7 @@ (menu-bar-mode -1) (global-linum-mode 1) -(add-to-list 'default-frame-alist '(font . "Iosevka-16")) +(add-to-list 'default-frame-alist '(font . "Iosevka-14")) (add-to-list 'default-frame-alist '(height . 24)) (add-to-list 'default-frame-alist '(width . 80)) @@ -113,7 +115,7 @@ helm-imenu-fuzzy-match t helm-completion-in-region-fuzzy-match t helm-candidate-number-list 80 - helm-split-window-in-side-p t + helm-split-window-inside-p t helm-move-to-line-cycle-in-source t helm-echo-input-in-header-line t helm-autoresize-max-height 0 @@ -171,6 +173,27 @@ :config (which-key-mode)) +;; Restart emacs from within emacs +(use-package restart-emacs + :ensure t) + +;; For Haskell & Rust Support +(use-package lsp-mode + :defer t + :ensure t + :commands lsp) +(use-package lsp-ui + :commands lsp-ui-mode) +(use-package company-lsp + :commands company-lsp) + +(use-package lsp-haskell + :defer t + :ensure t + :init + (add-hook 'haskell-mode-hook #'lsp) + ) + ;; Custom keybinding (use-package general :ensure t @@ -203,6 +226,7 @@ "wx" '(delete-window :which-key "delete window") "qz" '(delete-frame :which-key "delete frame") "qq" '(kill-emacs :which-key "quit") + "qr" '(restart-emacs :which-key "restart emacs") ;; NeoTree "ft" '(neotree-toggle :which-key "toggle neotree") ;; Others @@ -246,6 +270,8 @@ (use-package flycheck :ensure t :init (global-flycheck-mode)) +;; To disable flycheck while working with this file +(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc)) ;; Company mode (use-package company @@ -329,9 +355,11 @@ (c-set-style "linux-tabs-only"))))) (defun helm-gtags-dwim-other-window () - "helm-gtags-dwim in the other window" + ;; Enable helm-gtags-dwim in the other window (interactive) (let ((helm-gtags--use-otherwin t) (split-height-threshold nil) (split-width-threshold 140)) (helm-gtags-dwim))) + +;;; init.el ends