forked from coditoergosum/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_emacs
54 lines (45 loc) · 2.02 KB
/
dot_emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(setq package-selected-packages '(lsp-mode yasnippet lsp-treemacs helm-lsp
projectile hydra flycheck company avy which-key helm-xref dap-mode))
(when (cl-find-if-not #'package-installed-p package-selected-packages)
(package-refresh-contents)
(mapc #'package-install package-selected-packages))
;; sample `helm' configuration use https://github.com/emacs-helm/helm/ for details
(helm-mode)
(require 'helm-xref)
(define-key global-map [remap find-file] #'helm-find-files)
(define-key global-map [remap execute-extended-command] #'helm-M-x)
(define-key global-map [remap switch-to-buffer] #'helm-mini)
(which-key-mode)
(add-hook 'c-mode-hook 'lsp)
(add-hook 'c++-mode-hook 'lsp)
(add-hook 'c++-mode-hook #'yas-minor-mode)
(add-hook 'c++-mode-hook 'show-paren-mode)
(add-hook 'c-mode-hook 'show-paren-mode)
(setq gc-cons-threshold (* 100 1024 1024)
read-process-output-max (* 1024 1024)
treemacs-space-between-root-nodes nil
company-idle-delay 0.0
company-minimum-prefix-length 1
lsp-idle-delay 0.1) ;; clangd is fast
(with-eval-after-load 'lsp-mode
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
; (require 'dap-cpptools)
(yas-global-mode))
(setq yas-snippet-dirs '("~/.emacs.d/mysnippets"
"~/.emacs.d/snippets"))
(load "$HOME/git/bhandarkar-pranav/llvm-project/llvm/utils/emacs/emacs.el")
(setq load-path
(cons (expand-file-name "$HOME/git/bhandarkar-pranav/llvm-project/llvm/utils/emacs") load-path))
(require 'llvm-mode)
(require 'tablegen-mode)
;(require 'llvm-mir-mode)
;; for some reason the above require is just not working, so brute-force load llvm-mir-mode.el
(load "$HOME/git/bhandarkar-pranav/llvm-project/llvm/utils/emacs/llvm-mir-mode.el")
(setq load-path
(cons (expand-file-name "/work/prbhanda/git/bhandarkar-pranav/llvm-project/mlir/utils/emacs") load-path))
(require 'mlir-mode)
;ediff set up
(setq ediff-window-setup-function 'ediff-setup-windows-plain)