 (defmacro floo-get-item (alist key)
   "just grab an element from an alist"
   (list 'cdr (list 'assoc key alist)))
+
+(defun floobits-post-command-func ()
+  "used for grabbing changes in point for highlighting"
+  (let* ((name (buffer-name (current-buffer)))
+    (current (list
+      (cons 'point (or (point) -1))
+      (cons 'mark (or (mark) -1))
+      (cons 'name (or name "")))))
+    (unless (equal current floobits-current-position)
+      (setq floobits-current-position current)
+      (let* ((mark (floo-get-item current 'mark))
+        (req (list
+          (cons 'ranges (list (list mark mark)))
+          (cons 'full-path (buffer-file-name (current-buffer))))))
+        (floobits-send-to-agent req 'highlight)))))
 
 (defun floobits-filter-func (condp lst)
   (delq nil


;;(add-hook 'before-change-functions 'before-change nil nil)
(add-hook 'after-change-functions 'floobits-after-change nil nil)
(add-hook 'find-file-hook 'floobits-after-new-buffer nil t)
(floobits-launch-agent)

(require 'cl)
(require 'json)
(require 'url)

