summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-prog.el
blob: 60abc219bc6e40bbb6490459beeec4b1b2f4fe82 (plain) (blame)
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 'fcuny-vars)

(use-package company
  :ensure t
  :diminish company-mode
  :custom
  (company-minimum-prefix-length 2)
  (company-tooltip-align-annotations t)
  (company-tooltip-limit 12)
  (company-idle-delay 1))

(use-package company-posframe
  :ensure t
  :diminish company-posframe-mode
  :hook (company-mode . company-posframe-mode)
  :after company)

(use-package lsp-mode
  :ensure t
  :commands (lsp lsp-deferred)
  :bind (:map lsp-mode-map
              ("C-c e b" . lsp-format-buffer)
              ("C-c e m" . lsp-ui-imenu)
              ("C-c e r" . lsp-rename)
              ("C-c e p" . lsp-ui-peek-find-references)
              ("C-c e d" . lsp-ui-peek-find-definitions)
              ("C-c e t" . lsp-find-type-definition))
  :custom
  (lsp-session-file (expand-file-name "lsp-session-v1" fcuny/path-emacs-var))
  (lsp-enable-snippet nil)
  (lsp-prefer-flymake nil))

(use-package lsp-ui
  :ensure t
  :commands lsp-ui-mode
  :custom
  (lsp-ui-doc-enable nil)
  (lsp-ui-doc-include-signature t)
  (lsp-ui-peek-enable t)
  (lsp-ui-sideline-enable t)
  (lsp-ui-imenu-enable t)
  (lsp-ui-flycheck-enable t))

(use-package company-lsp
  :ensure t
  :after company
  :commands company-lsp
  :config
  (push 'company-lsp company-backends)
  :custom
  (company-lsp-enable-snippet t)
  (company-lsp-cache-candidates t))

(provide 'fcuny-prog)