mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 15:41:37 -05:00
[WIP] Back to the old prefix behavior in company-jupyter-repl
This needs to be changed. `company-grab-symbol` will only grab 'bar' when cursor is at | in the following: foo.bar| We would like it to grab the whole 'foo.bar' and let the kernel figure out what to do. Similarly for other operators like '->'. The problem that needs to be fixed is to properly replace just the 'bar' part if 'foo.bar' is the prefix. I believe the `match` command of a company backend will be of use.
This commit is contained in:
parent
8431e6834b
commit
9e2db2146b
1 changed files with 7 additions and 5 deletions
|
@ -707,11 +707,13 @@ The first character of the cell code corresponds to position 1."
|
|||
(prefix (and (eq major-mode 'jupyter-repl-mode)
|
||||
(not (get-text-property (point) 'read-only))
|
||||
;; Just grab a symbol, we will just send the whole code cell
|
||||
(buffer-substring (or (save-excursion
|
||||
(when (re-search-backward "[ \t]" (point-at-bol) 'noerror)
|
||||
(1+ (point))))
|
||||
(point-at-bol))
|
||||
(point))))
|
||||
(company-grab-symbol)
|
||||
;; (buffer-substring (or (save-excursion
|
||||
;; (when (re-search-backward "[ \t]" (point-at-bol) 'noerror)
|
||||
;; (1+ (point))))
|
||||
;; (point-at-bol))
|
||||
;; (point))
|
||||
))
|
||||
(candidates
|
||||
(cons
|
||||
:async
|
||||
|
|
Loading…
Add table
Reference in a new issue