Skip to content

Commit

Permalink
Fix: #421 Revert 5ba04fd...9b1b5ce
Browse files Browse the repository at this point in the history
Signed-off-by: Mingde (Matthew) Zeng <[email protected]>
  • Loading branch information
MatthewZMD authored and brotzeit committed Mar 11, 2020
1 parent 70c2fec commit e91d526
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
6 changes: 5 additions & 1 deletion lsp-ui-peek.el
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
;;; Code:

(require 'lsp-mode)
(require 'lsp-ui)
(require 'xref)
(require 'dash)

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

;; lsp-ui.el loads lsp-ui-peek.el, so we can’t ‘require’ lsp-ui.
;; FIXME: Remove this cyclic dependency.
(declare-function lsp-ui--workspace-path "lsp-ui" (path))

(declare-function evil-set-jump "ext:evil-jumps.el" (&optional pos))

(provide 'lsp-ui-peek)
Expand Down
19 changes: 8 additions & 11 deletions lsp-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@
:link '(custom-manual "(lsp-ui) Top")
:link '(info-link "(lsp-ui) Customizing"))

(require 'cl-lib)
(require 'lsp-ui-sideline)
(require 'lsp-ui-peek)
(require 'lsp-ui-imenu)
(require 'lsp-ui-doc)
(require 'dash)

(with-eval-after-load 'flycheck
(require 'lsp-ui-flycheck))

(with-eval-after-load 'winum
(when (and (boundp 'winum-ignored-buffers-regexp) lsp-ui-doc-winum-ignore)
(add-to-list 'winum-ignored-buffers-regexp lsp-ui-doc--buffer-prefix)))
Expand Down Expand Up @@ -159,15 +165,6 @@ Both should have the form (FILENAME LINE COLUMN)."
(cons idx (length refs)))
(cons 0 0))))

(provide 'lsp-ui)

(cl-eval-when (load eval)
(require 'lsp-ui-sideline)
(require 'lsp-ui-peek)
(require 'lsp-ui-imenu)
(require 'lsp-ui-doc)

(with-eval-after-load 'flycheck
(require 'lsp-ui-flycheck)))

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

0 comments on commit e91d526

Please sign in to comment.