       (,fstar-syntax-structure    . 'fstar-structure-face)
       ,@fstar-syntax-additional)
      nil nil))
-  (font-lock-set-defaults))
+  (font-lock-set-defaults)
+  (add-to-list 'font-lock-extra-managed-props 'display))
 
 ;;; Syntax table
 

  (goto-char (match-end rewind-to))
  (match-end (or bound-to 0)))

(defconst fstar-syntax-id (rx symbol-start
                          (? (or "#" "'"))
                          (any "a-z_") (* (or wordchar (syntax symbol)))
                          (? "." (* (or wordchar (syntax symbol))))
                          symbol-end))

(defconst fstar-syntax-cs (rx symbol-start
                          (any "A-Z") (* (or wordchar (syntax symbol)))

       (2 'font-lock-function-name-face))
      (,fstar-syntax-cs (0 'font-lock-constant-face))
      ("(\\*--\\(build-config\\)"
       (1 'font-lock-preprocessor-face prepend))
      (,(concat "\\_<" fstar-syntax-id-unwrapped "\\(_[0-9]+\\)\\_>")
       (1 '(face fstar-subscript-face display (raise -0.3)) append)))))

(defun fstar-setup-font-lock ()
  "Setup font-lock for use with F*."
