-
Notifications
You must be signed in to change notification settings - Fork 1
/
rgr-lsp.el
60 lines (55 loc) · 1.87 KB
/
rgr-lsp.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(use-package eglot
:straight(:type built-in)
:custom
(eglot-autoshutdown t)
(eglot-send-changes-idle-time 0.5)
(eglot-ignored-server-capabilities '( :documentHighlightProvider));; dont let eglot/eldoc show doc, rather flymake.
:config
;;(add-hook 'eglot-stay-out-of 'yasnippet)
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
(defun rgr/eglot-on-save()
(when eglot--managed-mode
(eglot-format-buffer)
)
)
(defun rgr/eglot-managed-mode-hook()
(message "rgr/eglot hook"))
:hook
(before-save . rgr/eglot-on-save)
(eglot-managed-mode . rgr/eglot-managed-mode-hook)
((js-ts-mode c-ts-mode c++-ts-mode php-mode auctex-mode) . #'eglot-ensure)
:bind
(:map eglot-mode-map
("<C-return>" . eglot-code-actions)))
(use-package eglot-booster
;;:disabled t
:straight (:type git :host github :repo "jdtsmith/eglot-booster")
:after eglot
:config (eglot-booster-mode))
(use-package dape
:demand t
:preface
;; By default dape shares the same keybinding prefix as `gud'
;; If you do not want to use any prefix, set it to nil.
(setq dape-key-prefix "\C-x\C-a")
:custom
(dape-default-breakpoints-file (no-littering-expand-var-file-name "dape/dape-breakpoints"))
(dape-buffer-window-arrangement 'right)
(dape-info-hide-mode-line nil)
(dape-inlay-hints t)
;;(dape-cwd-fn 'projectile-project-root)
:hook
;; Save breakpoints on quit
((kill-emacs . dape-breakpoint-save)
(after-init . dape-breakpoint-load)
(dape-display-source . pulsar-pulse-line)
(dape-compile . kill-buffer))
:config
;; Turn on global bindings for setting breakpoints with mouse
(add-to-list 'recentf-exclude "dape-breakpoints")
(dape-breakpoint-global-mode)
(add-hook 'dape-info-parent-mode-hook
(defun dape--info-rescale ()
(face-remap-add-relative 'default :height 0.8)))
)
(provide 'rgr/lsp)