blob: 50512ab9c8d3b22e281307154790b7c15b4c6992 (
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
|
;;; init-lsp.el --- Configure LSP integration -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>
;;; Commentary:
;; Configure LSP integration
;;; Code:
(use-package eglot
:after yasnippet
:bind (:map eglot-mode-map
("C-c l a" . eglot-code-actions)
("C-c l r" . eglot-rename)
("C-c l f" . eglot-format-buffer))
:hook (eglot-managed-mode . (lambda () (eglot-inlay-hints-mode -1)))
:config
(setq-default read-process-output-max (* 1024 1024)
eglot-events-buffer-size 0
eglot-events-buffer-config '(:size 0 :format full))
(setq eglot-autoshutdown t)
(setq-default eglot-workspace-configuration
'(:pylsp (:plugins (:ruff (:enabled t)))
:gopls (:usePlaceholders t
:staticcheck t
:completeUnimported t
:matcher "CaseSensitive")))
;; uses https://github.com/nix-community/nixd for the LSP server instead of rnix
(add-to-list 'eglot-server-programs '(nix-mode . ("nixd"))))
(use-package eldoc-box
:ensure t
:hook
(eglot-managed-mode . eldoc-box-hover-mode)
:custom
(eldoc-box-max-pixel-width 1024)
:config
(set-face-attribute 'eldoc-box-border nil
:background "#000fff")
(set-face-attribute 'eldoc-box-body nil
:family "Monaspace Argon" :height 140)
(set-face-attribute 'eldoc-box-markdown-separator nil
:foreground "darkgray"))
(provide 'init-lsp)
;;; init-lsp.el ends here
|