-
Notifications
You must be signed in to change notification settings - Fork 0
/
em-packages.el
33 lines (24 loc) · 989 Bytes
/
em-packages.el
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
;; ============================================================
;; setup for external packages
;; ============================================================
(when (package-installed-p 'which-key) (which-key-mode t))
(when (package-installed-p 'projectile) (projectile-mode t))
;; setup for ccls
(setq bruce-ccls-enabled nil)
(let ((ccls-path "/home/z00249865/opt/ccls/bin/ccls"))
(when (and (package-installed-p 'ccls) (file-exists-p ccls-path))
(require 'ccls)
(setq ccls-executable ccls-path)
(setq bruce-ccls-enabled t)))
;; setup for lsp
(defun check-enable-lsp ()
(when (locate-dominating-file (buffer-file-name) ".ccls-cache")
(lsp)))
(when (and bruce-ccls-enabled (package-installed-p 'lsp-mode))
(add-hook 'c-mode-hook 'check-enable-lsp)
(add-hook 'c++-mode-hook 'check-enable-lsp))
(when (package-installed-p 'lsp-mode)
(setq lsp-enable-file-watchers nil))
;; set for lsp-ui
(when (package-installed-p 'lsp-ui)
(setq lsp-ui-doc-enable nil))