File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 1
1
; ;; lsp-cmake.el --- description -*- lexical-binding : t ; -*-
2
2
3
- ; ; Copyright (C) 2020 emacs-lsp maintainers
3
+ ; ; Copyright (C) 2020-2023 emacs-lsp maintainers
4
4
5
5
; ; Author: emacs-lsp maintainers
6
6
; ; Keywords: lsp, cmake
37
37
:group 'lsp-cmake
38
38
:package-version '(lsp-mode . " 8.0.1" ))
39
39
40
+ (defun lsp-cmake--download-server (_client callback error-callback update? )
41
+ " Install/update CMake language server using `pip
42
+
43
+ Will invoke CALLBACK or ERROR-CALLBACK based on result.
44
+ Will update if UPDATE? is t."
45
+ (lsp-async-start-process
46
+ callback
47
+ error-callback
48
+ " pip" " install" " cmake-language-server" (when update? " -U" )))
49
+
40
50
(lsp-register-client
41
51
(make-lsp-client :new-connection (lsp-stdio-connection
42
52
(lambda ()
43
53
lsp-cmake-server-command))
44
54
:activation-fn (lsp-activate-on " cmake" )
45
55
:priority -1
46
- :server-id 'cmakels ))
56
+ :server-id 'cmakels
57
+ :download-server-fn #'lsp-cmake--download-server ))
47
58
48
59
(lsp-consistency-check lsp-cmake)
49
60
Original file line number Diff line number Diff line change 1
1
; ;; lsp-nginx.el --- Nginx Client settings -*- lexical-binding : t ; -*-
2
2
3
- ; ; Copyright (C) 2021 Shen, Jen-Chieh
3
+ ; ; Copyright (C) 2021-2023 Shen, Jen-Chieh
4
4
5
5
; ; Author: Jen-Chieh Shen <[email protected] >
6
6
; ; Keywords: nginx lsp
40
40
:type '(repeat string)
41
41
:package-version `(lsp-mode . " 8.0.1" ))
42
42
43
+ (defun lsp-nginx--download-server (_client callback error-callback update? )
44
+ " Install/update Nginx language server using `pip
45
+
46
+ Will invoke CALLBACK or ERROR-CALLBACK based on result.
47
+ Will update if UPDATE? is t."
48
+ (lsp-async-start-process
49
+ callback
50
+ error-callback
51
+ " pip" " install" " nginx-language-server" (when update? " -U" )))
52
+
43
53
(lsp-register-client
44
54
(make-lsp-client :new-connection (lsp-stdio-connection
45
55
(lambda () lsp-nginx-server-command))
46
56
:major-modes '(nginx-mode)
47
57
:priority -1
48
- :server-id 'nginx-ls ))
58
+ :server-id 'nginx-ls
59
+ :download-server-fn #'lsp-nginx--download-server ))
49
60
50
61
(lsp-consistency-check lsp-nginx)
51
62
You can’t perform that action at this time.
0 commit comments