File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ return 'from foo import y as z'."
173
173
(when matching-aliases
174
174
(format " import %s " (nth 0 matching-aliases))))))))
175
175
176
- (defun pyimport--buffers-in-mode (mode )
177
- " Return a list of all the buffers with major mode MODE ."
176
+ (defun pyimport--buffers-in-mode (modes )
177
+ " Return a list of all the buffers with major modes MODES ."
178
178
(--filter (with-current-buffer it
179
- (eq major-mode mode ))
179
+ (member major-mode modes ))
180
180
(buffer-list )))
181
181
182
182
(defun pyimport--syntax-highlight (str )
@@ -204,7 +204,7 @@ This is a simple heuristic: we just look for imports in all open Python buffers.
204
204
(user-error " No symbol at point" ))
205
205
(setq symbol (substring-no-properties symbol))
206
206
; ; Find all the import lines in all Python buffers
207
- (dolist (buffer (pyimport--buffers-in-mode 'python-mode ))
207
+ (dolist (buffer (pyimport--buffers-in-mode '( python-mode python-ts-mode) ))
208
208
(dolist (line (pyimport--import-lines buffer))
209
209
(-if-let (import (pyimport--extract-simple-import line symbol))
210
210
(push import matching-lines))))
You can’t perform that action at this time.
0 commit comments