diff options
author | Mingde (Matthew) Zeng <matthewzmd@gmail.com> | 2020-03-10 10:46:24 -0400 |
---|---|---|
committer | brotzeit <brotzeitmacher@gmail.com> | 2020-03-11 19:37:04 +0100 |
commit | e91d52629c8c0934c9dfa924ea44aeaebe70097d (patch) | |
tree | 4cbe511c9946d1b603546d3639cb870209f9f14e | |
parent | 70c2fecbabe663a6af4e9414cafc7143f30b2f93 (diff) |
Fix: #421 Revert 5ba04fd...9b1b5ce
Signed-off-by: Mingde (Matthew) Zeng <matthewzmd@gmail.com>
-rw-r--r-- | lsp-ui-peek.el | 6 | ||||
-rw-r--r-- | lsp-ui.el | 19 |
2 files changed, 13 insertions, 12 deletions
diff --git a/lsp-ui-peek.el b/lsp-ui-peek.el index 2057fa4..b701279 100644 --- a/lsp-ui-peek.el +++ b/lsp-ui-peek.el @@ -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." @@ -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) @@ -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))) @@ -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 |