Skip to content

Commit c9c174f

Browse files
committed
Set :auto for :editor option in goto-definition
1 parent 921a0ca commit c9c174f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/portal/runtime/jvm/editor.clj

+10-2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@
133133
:response (select-keys response [:body :headers :status])}
134134
error)))))
135135

136+
(defmethod -open-editor :auto [info]
137+
(-open-editor
138+
(assoc info :editor
139+
(cond
140+
(fs/exists ".portal/vs-code.edn") :vs-code
141+
(fs/exists ".portal/intellij.edn") :intellij
142+
:else :emacs))))
143+
136144
(defn can-goto [input]
137145
(or (and (satisfies? IResolve input) (resolve input))
138146
(when-let [m (meta input)] (recur m))))
@@ -148,5 +156,5 @@
148156
:editor
149157
(or (:editor options)
150158
(:launcher options)
151-
:emacs)))
152-
true)))
159+
:auto)))
160+
true)))

0 commit comments

Comments
 (0)