|
19 | 19 | ;; Oliver Rausch
|
20 | 20 | ;; Keywords: languages, debug
|
21 | 21 | ;; URL: https://github.com/emacs-lsp/lsp-ivy
|
22 |
| -;; Package-Requires: ((emacs "25.1") (dash "2.14.1") (lsp-mode "5.0") (ivy "0.13.0")) |
23 |
| -;; Version: 0.2 |
| 22 | +;; Package-Requires: ((emacs "25.1") (dash "2.14.1") (lsp-mode "6.2.1") (ivy "0.13.0")) |
| 23 | +;; Version: 0.3 |
24 | 24 | ;;
|
25 | 25 |
|
26 | 26 | ;;; Commentary:
|
|
137 | 137 |
|
138 | 138 | (defun lsp-ivy--workspace-symbol (workspaces prompt initial-input)
|
139 | 139 | "Search against WORKSPACES with PROMPT and INITIAL-INPUT."
|
140 |
| - (let ((current-request-id nil)) |
141 |
| - (ivy-read |
142 |
| - prompt |
143 |
| - (lambda (user-input) |
144 |
| - (with-lsp-workspaces workspaces |
145 |
| - (let ((request (lsp-make-request |
146 |
| - "workspace/symbol" |
147 |
| - (list :query user-input)))) |
148 |
| - (when current-request-id |
149 |
| - (lsp--cancel-request |
150 |
| - current-request-id)) |
151 |
| - (lsp-send-request-async |
152 |
| - request |
153 |
| - (lambda (result) |
154 |
| - (ivy-update-candidates (-remove 'lsp-ivy--filter-func result))) |
155 |
| - :mode 'detached) |
156 |
| - (setq current-request-id (plist-get request :id)))) |
157 |
| - 0) |
158 |
| - :dynamic-collection t |
159 |
| - :require-match t |
160 |
| - :initial-input initial-input |
161 |
| - :action #'lsp-ivy--workspace-symbol-action |
162 |
| - :caller 'lsp-ivy-workspace-symbol))) |
| 140 | + (ivy-read |
| 141 | + prompt |
| 142 | + (lambda (user-input) |
| 143 | + (with-lsp-workspaces workspaces |
| 144 | + (lsp-request-async |
| 145 | + "workspace/symbol" |
| 146 | + (list :query user-input) |
| 147 | + (lambda (result) |
| 148 | + (ivy-update-candidates (-remove 'lsp-ivy--filter-func result))) |
| 149 | + :mode 'detached |
| 150 | + :cancel-token :workspace-symbol)) |
| 151 | + 0) |
| 152 | + :dynamic-collection t |
| 153 | + :require-match t |
| 154 | + :initial-input initial-input |
| 155 | + :action #'lsp-ivy--workspace-symbol-action |
| 156 | + :caller 'lsp-ivy-workspace-symbol)) |
163 | 157 |
|
164 | 158 | (ivy-configure 'lsp-ivy-workspace-symbol
|
165 | 159 | :display-transformer-fn #'lsp-ivy--format-symbol-match)
|
|
0 commit comments