cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Inlining a variable removes metadata from the following variable, if present

Open cursive-ghost opened this issue 1 year ago • 1 comments

For example, when inlining dir in this snippet:

(let [dir (jio/file "/Users/colin")
      ^FileFilter ff (fn [f] true)]
  (.listFiles dir ff))

cursive-ghost avatar Jun 12 '24 05:06 cursive-ghost

It also removes comments, in this case preceding when inlining title:

    (let [{:keys [display-name]} @state
          startup-progress-promise (promise)
          ; We basically just start this task to get a progress indicator - this is a bit crap, but the
          ; proper fix requires migrating to Kotlin & coroutines
          title (str "Starting " display-name)
          startup-progress-task (task/backgroundable project title false
                                  (fn [indicator]
                                    (progress/indeterminate indicator true)
                                    (let [settings (ClojureIdeSettings/getInstance)]
                                      (deref startup-progress-promise (* (.replTimeout settings) 1000) nil))))]
      (task/queue startup-progress-task)
      (swap! state assoc :startup-progress-promise startup-progress-promise))

cursive-ghost avatar Aug 04 '24 00:08 cursive-ghost