mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
preserve the no-op for now
This commit is contained in:
parent
6698b4f563
commit
22b4e58e56
1 changed files with 14 additions and 8 deletions
|
@ -112,14 +112,20 @@
|
||||||
(let* ((kernel (ein:get-kernel-or-error))
|
(let* ((kernel (ein:get-kernel-or-error))
|
||||||
(cached (ein:completions-get-cached arg (ein:$kernel-oinfo-cache kernel))))
|
(cached (ein:completions-get-cached arg (ein:$kernel-oinfo-cache kernel))))
|
||||||
(ein:aif cached it
|
(ein:aif cached it
|
||||||
(case ein:completion-backend
|
(unless (and (looking-at "[[:nonascii:]]") (ein:company--punctuation-check (thing-at-point 'line) (current-column)))
|
||||||
(ein:use-company-jedi-backend
|
(case ein:completion-backend
|
||||||
(cons :async (lambda (cb)
|
(ein:use-company-jedi-backend
|
||||||
(ein:company--complete-jedi cb))))
|
(cons :async (lambda (cb)
|
||||||
(t
|
(ein:company--complete-jedi cb))))
|
||||||
(cons :async
|
(t
|
||||||
(lambda (cb)
|
(cons :async
|
||||||
(ein:company--complete arg cb))))))))))
|
(lambda (cb)
|
||||||
|
(ein:company--complete arg cb)))))))))))
|
||||||
|
|
||||||
|
(defun ein:company--punctuation-check (thing col)
|
||||||
|
(let ((query (ein:trim-right (subseq thing 0 col) "[\n]")))
|
||||||
|
(string-match "[]()\",[{}'=: ]$" query (- col 2))))
|
||||||
|
|
||||||
|
|
||||||
(defun ein:company-handle-doc-buffer-finish (packed content _metadata-not-used_)
|
(defun ein:company-handle-doc-buffer-finish (packed content _metadata-not-used_)
|
||||||
(when (plist-get content :found)
|
(when (plist-get content :found)
|
||||||
|
|
Loading…
Add table
Reference in a new issue