Skip to content

Commit 169b1ac

Browse files
committed
remove unnecessary lines
1 parent 2bf2a01 commit 169b1ac

File tree

1 file changed

+5
-38
lines changed
  • src/test/clojure/com/github/clojure_lsp/intellij

1 file changed

+5
-38
lines changed

src/test/clojure/com/github/clojure_lsp/intellij/foo_test.clj

+5-38
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
(let [action (.getAction (ActionManager/getInstance) action-id)
5252
context (.getDataContext (DataManager/getInstance))]
5353
(println "Running action:" action-id)
54-
(println "Action:" action)
5554
(app-manager/write-command-action
5655
project
5756
(fn []
@@ -76,57 +75,25 @@
7675

7776
;; Para configurações persistentes via ServiceManager
7877
(let [my-settings (ServiceManager/getService SettingsState)] ;; Substitua pela classe real
79-
#_(.setServerPath my-settings "/tmp/clojure-lsp") ;; Atualiza o caminho do servidor
8078
(.loadState my-settings my-settings));; Atualiza estado
81-
(println "LSP exists? >> ")
82-
#_(println (.exists (io/as-file "/tmp/clojure-lsp")))
83-
#_(server/start! project)
84-
85-
(clj4intellij.test/dispatch-all)
86-
(println "status LSP >> ")
87-
(println (lsp-client/server-status project))
88-
(println (db/get-in project [:status]))
89-
#_(Thread/sleep 10000)
79+
80+
(clj4intellij.test/dispatch-all)
9081
(dispatch-all-until {:project project})
91-
#_(dispatch-all-until
92-
{:cond-fn (fn []
93-
(let [status (lsp-client/server-status project)]
94-
(println "Current status:" status)
95-
(= status :started)))
96-
:millis 1000})
97-
(println "status LSP >> ")
98-
(println (lsp-client/server-status project))
99-
(println (db/get-in project [:status]))
100-
82+
(println "status LSP >> " (db/get-in project [:status]))
10183
(let [editor (.getEditor fixture)
10284
document (.getDocument editor)
10385
offset (.getLineStartOffset document 2)
10486
caret (.getCaretModel editor)
10587
pos (.getLogicalPosition caret)
10688
new-position (LogicalPosition. 2 8)]
107-
(println "editor >> ")
108-
(println editor)
109-
(println caret)
110-
(println pos)
111-
(println (.getVisualPosition caret))
11289
(println (.getText document))
11390
@(app-manager/invoke-later!
11491
{:invoke-fn (fn []
11592
#_(.moveToOffset caret (+ offset 9))
116-
(.moveToLogicalPosition caret new-position))})
117-
(println (.getLogicalPosition caret))
118-
(println (.getVisualPosition caret)))
93+
(.moveToLogicalPosition caret new-position))}))
11994
(run-editor-action "ClojureLSP.ForwardSlurp" project)
120-
12195
(clj4intellij.test/dispatch-all)
122-
(println (-> fixture .getEditor .getDocument .getText))
123-
124-
#_@(app-manager/invoke-later!
125-
{:invoke-fn (fn []
126-
(let [widget (get-status-bar-widget project "ClojureLSPStatusBar")]
127-
(println "Widget:" widget)
128-
(is (some? widget))))})
129-
96+
(println (-> fixture .getEditor .getDocument .getText))
13097
(.checkResultByFile fixture "foo_expected.clj")
13198
(server/shutdown! project)))
13299

0 commit comments

Comments
 (0)