-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path+lsp.el
82 lines (71 loc) · 3.22 KB
/
+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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
;;; +lsp.el -*- lexical-binding: t; -*-
;; Performance improvements
(setenv "LSP_USE_PLISTS" "true")
(setq lsp-use-plists t)
(after! lsp-clangd
(setq lsp-clients-clangd-args '("-j=3"
"--background-index"
"--clang-tidy"
"--completion-style=detailed"
"--header-insertion=never"
"--header-insertion-decorators=0"))
(set-lsp-priority! 'clangd 2)
(after! dap-mode
(require 'dap-codelldb)
(setq dap-auto-configure-mode t)
(require 'dap-cpptools)))
;; Typescript
(setq lsp-clients-typescript-init-opts
'(:importModuleSpecifierPreference "relative"))
(setq +lsp-prompt-to-install-server 'quiet)
(after! lsp-mode
(setq +format-with-lsp nil)
(setq lsp-log-io nil
lsp-file-watch-threshold 4000
lsp-headerline-breadcrumb-enable t
lsp-headerline-breadcrumb-icons-enable nil
lsp-headerline-breadcrumb-segments '(file symbols)
lsp-imenu-index-symbol-kinds '(File Module Namespace Package Class Method Enum Interface
Function Variable Constant Struct Event Operator TypeParameter))
(dolist (dir '("[/\\\\]\\.ccls-cache\\'"
"[/\\\\]\\.mypy_cache\\'"
"[/\\\\]\\.pytest_cache\\'"
"[/\\\\]\\.cache\\'"
"[/\\\\]\\.clwb\\'"
"[/\\\\]__pycache__\\'"
"[/\\\\]bazel-bin\\'"
"[/\\\\]bazel-code\\'"
"[/\\\\]bazel-genfiles\\'"
"[/\\\\]bazel-out\\'"
"[/\\\\]bazel-testlogs\\'"
"[/\\\\]third_party\\'"
"[/\\\\]third-party\\'"
"[/\\\\]buildtools\\'"
"[/\\\\]out\\'"
"[/\\\\]build\\'"))
(push dir lsp-file-watch-ignored-directories)))
(after! lsp-ui
(setq lsp-ui-doc-enable nil
lsp-lens-enable nil
lsp-ui-sideline-enable nil
lsp-ui-doc-include-signature nil
lsp-ui-doc-max-height 15
lsp-ui-doc-max-width 100))
(use-package lsp-docker
:when (not (modulep! :tools lsp +eglot))
:defer t
:commands lsp-docker-init-clients
:config
(defvar lsp-docker-client-packages
'(lsp-css lsp-clients lsp-bash lsp-go lsp-pyls lsp-html lsp-typescript
lsp-terraform lsp-cpp))
(defvar lsp-docker-client-configs
(list
(list :server-id 'bash-ls :docker-server-id 'bashls-docker :server-command "bash-language-server start")
(list :server-id 'clangd :docker-server-id 'clangd-docker :server-command "ccls")
(list :server-id 'css-ls :docker-server-id 'cssls-docker :server-command "css-languageserver --stdio")
(list :server-id 'dockerfile-ls :docker-server-id 'dockerfilels-docker :server-command "docker-langserver --stdio")
(list :server-id 'gopls :docker-server-id 'gopls-docker :server-command "gopls")
(list :server-id 'html-ls :docker-server-id 'htmls-docker :server-command "html-languageserver --stdio")
(list :server-id 'pyls :docker-server-id 'pyls-docker :server-command "pyls")
(list :server-id 'ts-ls :docker-server-id 'tsls-docker :server-command "typescript-language-server --stdio"))))