Skip to content

Commit 5bd7a82

Browse files
committed
prime caches for rust analyzer
1 parent 191ee2f commit 5bd7a82

File tree

1 file changed

+6
-3
lines changed
  • src/io/github/dundalek/stratify

1 file changed

+6
-3
lines changed

src/io/github/dundalek/stratify/lsp.clj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
(ns io.github.dundalek.stratify.lsp
22
(:require
33
[babashka.fs :as fs]
4+
[babashka.process :refer [shell]]
5+
[clojure.data.xml :as xml]
46
[clojure.java.io :as io]
57
[clojure.main :as clj-main]
68
[clojure.string :as str]
9+
[io.github.dundalek.stratify.dgml :as sdgml]
710
[io.github.dundalek.stratify.internal :as internal]
811
[io.github.dundalek.stratify.kondo :as kondo]
9-
[jsonista.core :as j]
10-
[clojure.data.xml :as xml]
11-
[io.github.dundalek.stratify.dgml :as sdgml]
1212
[io.github.dundalek.stratify.style :as style]
13+
[jsonista.core :as j]
1314
[loom.attr :as la]
1415
[loom.graph :as lg]
1516
[xmlns.http%3A%2F%2Fschemas.microsoft.com%2Fvs%2F2009%2Fdgml :as-alias dgml])
@@ -402,6 +403,8 @@
402403
(defn extract-rust [opts]
403404
(let [opts (normalize-opts opts)
404405
{:keys [root-path]} opts
406+
;; Try to prime caches first since waiting for priming mesages seems unreliable
407+
_ (shell "rust-analyzer prime-caches" root-path)
405408
server (start-server {:args ["rust-analyzer"]})]
406409
(try
407410
(initialize-rust-analyzer! server {:root-path root-path})

0 commit comments

Comments
 (0)