(defn
get-completion-info
[]
(when-let
[prefix-elem (get-focused-elem "symbol")]
(let
[pos
(-> prefix-elem (get-cursor-position false) first)
text
(.-textContent prefix-elem)
prefix
(subs text 0 pos)]
(assoc
(get-completion-context (count text) (count prefix))
:text
text
:prefix
prefix))))