 	 (file (position-file pos)))
     (liquid-annot-set file mode)))
 
-;; DEBUG (defface my-tooltip
-;; DEBUG   '((t
-;; DEBUG      :background "gray85"
-;; DEBUG      :foreground "black"
-;; DEBUG      :inherit variable-pitch))
-;; DEBUG   "Face for my tooltip.")
-;; DEBUG 
-;; DEBUG (defface my-tooltip-highlight
-;; DEBUG   '((t
-;; DEBUG      :background "blue"
-;; DEBUG      :foreground "white"
-;; DEBUG      :inherit my-tooltip))
-;; DEBUG   "Face for my tooltip highlighted.")
-;; DEBUG 
-;; DEBUG (let ((str (propertize "foo\nbar\nbaz" 'face 'my-tooltip)))
-;; DEBUG   (put-text-property 6 11 'face 'my-tooltip-highlight str)
-;; DEBUG   (pos-tip-show-no-propertize str 'my-tooltip))
+
+;; For simple, ascii popups, use:
+;;    (liquid-tip-init 'ascii) 
+;; For emacs', balloon based popups, use:
+;;    (liquid-tip-init 'balloon)
+;; or just
+;;    (liquid-tip-init 'balloon)
+
+;; Reload annotations after check
+(add-hook 'flycheck-after-syntax-check-hook
+	  (lambda () (liquid-tip-update 'flycheck)))
+
+
 
 (provide 'liquid-tip)
 


;;; Code:
(eval-when-compile (require 'cl))
(require 'json)
(require 'pos-tip nil t)
(require 'thingatpt)
(require 'button-lock nil t)

;; (require 'json-mode)
;; (require 'ring)
;; (require 'etags)
;; (require 'flymake)
;; (require 'eldoc)
;; (require 'log4e)
;; (require 'yaxception)

;; ------------------------------------------------------------------------
;; A structure to represent positions 

;; DEBUG 	    (position-string pos) 
;; DEBUG 	    ident)))

(defun liquid-ident-at-pos (pos)
  "Return the identifier at a given position"
  (thing-at-point 'word))
