init.el: Update emacs init.el
LSP has not been tested yet. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
8ce036ab29
commit
1dd9f52eee
1 changed files with 32 additions and 4 deletions
36
init.el
36
init.el
|
@ -1,5 +1,7 @@
|
||||||
;;; Package configs
|
;;; init.el --- Initialization file for emacs
|
||||||
|
;;; Commentary: Emacs startup file --- initialization file for emacs
|
||||||
(require 'package)
|
(require 'package)
|
||||||
|
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
(setq package-archives
|
(setq package-archives
|
||||||
'(("org" . "http://orgmode.org/elpa/")
|
'(("org" . "http://orgmode.org/elpa/")
|
||||||
|
@ -67,7 +69,7 @@
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(global-linum-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 '(height . 24))
|
||||||
(add-to-list 'default-frame-alist '(width . 80))
|
(add-to-list 'default-frame-alist '(width . 80))
|
||||||
|
|
||||||
|
@ -113,7 +115,7 @@
|
||||||
helm-imenu-fuzzy-match t
|
helm-imenu-fuzzy-match t
|
||||||
helm-completion-in-region-fuzzy-match t
|
helm-completion-in-region-fuzzy-match t
|
||||||
helm-candidate-number-list 80
|
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-move-to-line-cycle-in-source t
|
||||||
helm-echo-input-in-header-line t
|
helm-echo-input-in-header-line t
|
||||||
helm-autoresize-max-height 0
|
helm-autoresize-max-height 0
|
||||||
|
@ -171,6 +173,27 @@
|
||||||
:config
|
:config
|
||||||
(which-key-mode))
|
(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
|
;; Custom keybinding
|
||||||
(use-package general
|
(use-package general
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -203,6 +226,7 @@
|
||||||
"wx" '(delete-window :which-key "delete window")
|
"wx" '(delete-window :which-key "delete window")
|
||||||
"qz" '(delete-frame :which-key "delete frame")
|
"qz" '(delete-frame :which-key "delete frame")
|
||||||
"qq" '(kill-emacs :which-key "quit")
|
"qq" '(kill-emacs :which-key "quit")
|
||||||
|
"qr" '(restart-emacs :which-key "restart emacs")
|
||||||
;; NeoTree
|
;; NeoTree
|
||||||
"ft" '(neotree-toggle :which-key "toggle neotree")
|
"ft" '(neotree-toggle :which-key "toggle neotree")
|
||||||
;; Others
|
;; Others
|
||||||
|
@ -246,6 +270,8 @@
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (global-flycheck-mode))
|
:init (global-flycheck-mode))
|
||||||
|
;; To disable flycheck while working with this file
|
||||||
|
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
|
||||||
|
|
||||||
;; Company mode
|
;; Company mode
|
||||||
(use-package company
|
(use-package company
|
||||||
|
@ -329,9 +355,11 @@
|
||||||
(c-set-style "linux-tabs-only")))))
|
(c-set-style "linux-tabs-only")))))
|
||||||
|
|
||||||
(defun helm-gtags-dwim-other-window ()
|
(defun helm-gtags-dwim-other-window ()
|
||||||
"helm-gtags-dwim in the other window"
|
;; Enable helm-gtags-dwim in the other window
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((helm-gtags--use-otherwin t)
|
(let ((helm-gtags--use-otherwin t)
|
||||||
(split-height-threshold nil)
|
(split-height-threshold nil)
|
||||||
(split-width-threshold 140))
|
(split-width-threshold 140))
|
||||||
(helm-gtags-dwim)))
|
(helm-gtags-dwim)))
|
||||||
|
|
||||||
|
;;; init.el ends
|
||||||
|
|
Loading…
Reference in a new issue