Skip to content

Commit e91d526

Browse files
MatthewZMDbrotzeit
authored andcommitted
Fix: #421 Revert 5ba04fd...9b1b5ce
Signed-off-by: Mingde (Matthew) Zeng <[email protected]>
1 parent 70c2fec commit e91d526

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

lsp-ui-peek.el

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
;;; Code:
3636

3737
(require 'lsp-mode)
38-
(require 'lsp-ui)
3938
(require 'xref)
39+
(require 'dash)
4040

4141
(defgroup lsp-ui-peek nil
4242
"Improve version of xref with peek feature."
@@ -718,6 +718,10 @@ Returns item(s)."
718718
(unless (bound-and-true-p lsp-ui-mode-map)
719719
(user-error "Please load lsp-ui before trying to enable lsp-ui-peek")))
720720

721+
;; lsp-ui.el loads lsp-ui-peek.el, so we can’t ‘require’ lsp-ui.
722+
;; FIXME: Remove this cyclic dependency.
723+
(declare-function lsp-ui--workspace-path "lsp-ui" (path))
724+
721725
(declare-function evil-set-jump "ext:evil-jumps.el" (&optional pos))
722726

723727
(provide 'lsp-ui-peek)

lsp-ui.el

+8-11
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@
4040
:link '(custom-manual "(lsp-ui) Top")
4141
:link '(info-link "(lsp-ui) Customizing"))
4242

43-
(require 'cl-lib)
43+
(require 'lsp-ui-sideline)
44+
(require 'lsp-ui-peek)
45+
(require 'lsp-ui-imenu)
46+
(require 'lsp-ui-doc)
4447
(require 'dash)
4548

49+
(with-eval-after-load 'flycheck
50+
(require 'lsp-ui-flycheck))
51+
4652
(with-eval-after-load 'winum
4753
(when (and (boundp 'winum-ignored-buffers-regexp) lsp-ui-doc-winum-ignore)
4854
(add-to-list 'winum-ignored-buffers-regexp lsp-ui-doc--buffer-prefix)))
@@ -159,15 +165,6 @@ Both should have the form (FILENAME LINE COLUMN)."
159165
(cons idx (length refs)))
160166
(cons 0 0))))
161167

162-
(provide 'lsp-ui)
163-
164-
(cl-eval-when (load eval)
165-
(require 'lsp-ui-sideline)
166-
(require 'lsp-ui-peek)
167-
(require 'lsp-ui-imenu)
168-
(require 'lsp-ui-doc)
169-
170-
(with-eval-after-load 'flycheck
171-
(require 'lsp-ui-flycheck)))
172168

169+
(provide 'lsp-ui)
173170
;;; lsp-ui.el ends here

0 commit comments

Comments
 (0)