                                 (update-buttons text-group text-area))
                               (removeUpdate [this e]
                                 (update-buttons text-group text-area))))
-      (.setSyntaxEditingStyle text-area (get-syntax-style path))
       (-> (java.io/resource "dark.xml")
           java.io/input-stream
           Theme/load

  (or (get styles (get-extension path))
      SyntaxConstants/SYNTAX_STYLE_NONE))

(defn create-editor
  [path]
  (when (and (.isFile (java.io/file path))
             (contains? styles (get-extension path)))
    (let [text-area (if (contains? paredit-exts (get-extension path))
                      (paredit/paredit-widget (TextEditorPane.))
                      (TextEditorPane.))
          text-area-scroll (RTextScrollPane. text-area)
          btn-group (utils/wrap-panel
                      :items [(s/button :id :save-button
                                        :text (utils/get-string :save)

                                      :listen [:key-released search])])
          text-group (s/border-panel
                       :north btn-group
                       :center (RTextScrollPane. text-area))]
      (doto text-group
        (shortcuts/create-mappings {:save-button save-file
                                    :undo-button undo-file
                                    :redo-button redo-file
                                    :find-field focus-on-find
                                    :font-enc-button increase-font-size
                                    :font-dec-button decrease-font-size})
        shortcuts/create-hints
        (update-buttons text-area))
      (doto (TextPrompt. (utils/get-string :find)
                         (s/select text-group [:#find-field]))
        (.changeAlpha 0.5))
      (doto text-area
        (.load (FileLocation/create path) nil)
        .discardAllEdits
        (.setAntiAliasingEnabled true)
        (s/listen :key-released
                  (fn [e] (update-buttons text-group text-area)))
        (.setSyntaxEditingStyle (get-syntax-style path))
        (.setMarginLineEnabled true)
        (.setMarginLinePosition 80))
      (when is-clojure? (.setTabSize text-area 2))
      (.addDocumentListener (.getDocument text-area)
                            (reify DocumentListener
                              (changedUpdate [this e]
