preserve the no-op for now

This commit is contained in:
dickmao 2019-03-15 00:50:13 -04:00
parent 6698b4f563
commit 22b4e58e56

View file

@ -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)