Skip to content

Commit b29789d

Browse files
committed
WIP
1 parent 1fb14a0 commit b29789d

File tree

11 files changed

+117
-76
lines changed

11 files changed

+117
-76
lines changed

build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
exclude("org.clojure", "core.async")
3737
}
3838
implementation ("com.rpl:proxy-plus:0.0.9")
39-
implementation ("markdown-clj:markdown-clj:1.12.1")
39+
// implementation ("markdown-clj:markdown-clj:1.12.1")
4040
}
4141

4242
sourceSets {
@@ -70,16 +70,16 @@ changelog {
7070
}
7171

7272
java {
73-
targetCompatibility = JavaVersion.VERSION_11
74-
sourceCompatibility = JavaVersion.VERSION_11
73+
targetCompatibility = JavaVersion.VERSION_17
74+
sourceCompatibility = JavaVersion.VERSION_17
7575
}
7676

7777
tasks {
7878
compileKotlin {
7979
kotlinOptions {
80-
jvmTarget = "11"
81-
apiVersion = "1.5"
82-
languageVersion = "1.5"
80+
jvmTarget = "17"
81+
apiVersion = "1.9"
82+
languageVersion = "1.9"
8383
freeCompilerArgs = listOf("-Xjvm-default=all")
8484
}
8585
}

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ pluginVersion = 2.6.4
77

88
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
99
# for insight into build numbers and IntelliJ Platform versions.
10-
pluginSinceBuild = 213
10+
pluginSinceBuild = 233
1111

1212
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
1313
# See https://jb.gg/intellij-platform-builds-list for available build versions.
14-
pluginVerifierIdeVersions = 2021.3.3, 2022.1, 2022.2, 2022.3, 2023.1, 2023.2
14+
pluginVerifierIdeVersions = 2023.3
1515

1616
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
1717
platformType = IC
18-
platformVersion = 2021.3
18+
platformVersion = 2023.3
1919

2020
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
2121
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
22-
platformPlugins = com.intellij.java
22+
platformPlugins = com.intellij.java, com.redhat.devtools.lsp4ij:0.9.0
2323

2424
# Gradle Releases -> https://github.com/gradle/gradle/releases
2525
gradleVersion = 7.6.1

src/main/clojure/com/github/clojure_lsp/intellij/extension/documentation.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
(:require
66
[com.github.clojure-lsp.intellij.client :as lsp-client]
77
[com.github.clojure-lsp.intellij.db :as db]
8-
[markdown.core :as markdown])
8+
#_[markdown.core :as markdown])
99
(:import
1010
[com.intellij.openapi.util.text StringUtil]
1111
[com.intellij.openapi.util.text HtmlBuilder]
@@ -80,7 +80,7 @@
8080
:position {:line (.line line-col)
8181
:character (.column line-col)}}])]
8282

83-
(when-let [html (markdown/md-to-html-string (:value contents)
83+
(when-let [html "" #_(markdown/md-to-html-string (:value contents)
8484
:codeblock-no-escape? true
8585
:codeblock-callback (fn [code language]
8686
(if (= language "clojure")

src/main/clojure/com/github/clojure_lsp/intellij/extension/general_settings.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
:listen [:action (fn [_]
9090
(doseq [project (db/all-projects)]
9191
(server/shutdown! project)
92-
(server/start-server! project)))]) "wrap"]]) "span"]
92+
#_(server/start-server! project)))]) "wrap"]]) "span"]
9393
[(s/label :text "* requires LSP restart"
9494
:font (s.font/font :size 14)
9595
:foreground (s.color/color 110 110 110)) "wrap"]]

src/main/clojure/com/github/clojure_lsp/intellij/extension/init_db_startup.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
[com.github.ericdallo.clj4intellij.logger :as logger])
99
(:import
1010
[com.github.clojure_lsp.intellij.extension SettingsState]
11-
[com.intellij.openapi.project Project]))
11+
[com.intellij.openapi.project Project]
12+
[com.redhat.devtools.lsp4ij LanguageServerManager LanguageServerManager$StartOptions]))
1213

1314
(set! *warn-on-reflection* true)
1415

1516
(defn -runActivity [_this ^Project project]
1617
(db/init-db-for-project project)
1718
(db/load-settings-from-state! project (SettingsState/get))
19+
#_(.start (LanguageServerManager/getInstance (first (db/all-projects))) "clojure-lsp" )
1820
(logger/info "Loaded settings to memory:" (db/get-in project [:settings])))
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
(ns com.github.clojure-lsp.intellij.extension.language-server-factory
2+
(:gen-class
3+
:name com.github.clojure_lsp.intellij.extension.LanguageServerFactory
4+
:implements [com.redhat.devtools.lsp4ij.LanguageServerFactory])
5+
(:require
6+
[com.github.ericdallo.clj4intellij.logger :as logger]
7+
[com.rpl.proxy-plus :refer [proxy+]])
8+
(:import
9+
[com.intellij.execution.configurations GeneralCommandLine]
10+
[com.intellij.openapi.project Project]
11+
[com.redhat.devtools.lsp4ij.server OSProcessStreamConnectionProvider]))
12+
13+
(defn -createConnectionProvider [_ ^Project project]
14+
(logger/info "------->")
15+
(doto (proxy+
16+
[]
17+
OSProcessStreamConnectionProvider)
18+
(.setCommandLine (GeneralCommandLine. ["/home/greg/dev/clojure-lsp/clojure-lsp" "listen"]))))
19+
20+
;; TODO custom commands
21+
;; (defn -createLanguageClient [_ ^Project project]
22+
;; )
23+
24+
;; TODO customer server methods
25+
;; (defn -getServerInterface [_]
26+
;; )

src/main/clojure/com/github/clojure_lsp/intellij/extension/status_bar_factory.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
DumbAwareAction
6161
(actionPerformed [_ _event]
6262
(server/shutdown! project)
63-
(server/start-server! project))))
63+
#_(server/start-server! project))))
6464

6565
(defn ^:private status-bar-title [project]
6666
(str "Clojure LSP: " (name (db/get-in project [:status] "disconnected"))))

src/main/clojure/com/github/clojure_lsp/intellij/listener/file.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
(do
3939
(db/init-db-for-project project)
4040
(db/load-settings-from-state! project (SettingsState/get))
41-
(server/start-server! project))))
41+
#_(server/start-server! project))))
4242

4343
(defn -fileOpened [_this ^FileEditorManager source ^VirtualFile file]
4444
(let [project (.getProject source)]

src/main/clojure/com/github/clojure_lsp/intellij/psi.clj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
(:require
33
[clojure.string :as string]
44
[com.github.clojure-lsp.intellij.editor :as editor]
5-
[com.github.ericdallo.clj4intellij.logger :as logger]
65
[com.github.ericdallo.clj4intellij.util :as util])
76
(:import
87
[com.github.clojure_lsp.intellij ClojureLanguage]

src/main/clojure/com/github/clojure_lsp/intellij/server.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
(logger/info "Checking if server initialized, try number:" count)
134134
(recur (inc count))))))))
135135

136-
(defn start-server! [^Project project]
136+
#_(defn start-server! [^Project project]
137137
(db/assoc-in project [:status] :connecting)
138138
(run! #(% project :connecting) (:on-status-changed-fns @db/db*))
139139
(tasks/run-background-task!

0 commit comments

Comments
 (0)