Skip to content

Commit

Permalink
Merge branch 'master' into improve-install-api
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdallo authored Feb 25, 2025
2 parents 4251521 + 9fff7e6 commit fc517aa
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 103 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## [Unreleased]

- Fix comment form complain about missing paren.
- Improve server installation fixing concurrency bugs + using lsp4ij install API.

## 3.0.2

- Fix Settings page exception when more than a project was opened and closed.

## 3.0.1

- Bump clj4intellij to 0.6.3.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = com.github.clojure-lsp
pluginName = clojure-lsp
pluginVersion = 3.0.1
pluginVersion = 3.0.2

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions src/main/clojure/com/github/clojure_lsp/intellij/db.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@
(update projects (.getBasePath project) #(merge (assoc empty-project :project project) %))))))

(defn all-projects []
(remove nil?
(mapv :project (vals (:projects @db*)))))
(->> @db*
:projects
vals
(mapv :project)
(remove nil?)
(remove #(.isDisposed ^Project %))))
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@
{:name "raise-sexp" :text "Raise sexpr" :description "Raise current sexpr (Paredit)" :keyboard-shortcut {:first "alt R" :replace-all true}}
{:name "kill-sexp" :text "Kill sexpr" :description "Kill current sexpr (Paredit)" :keyboard-shortcut {:first "alt K" :replace-all true}}])

(defn ^:private on-action-performed [command-name text project ^AnActionEvent event]
(defn ^:private on-action-performed [command-name text ^AnActionEvent event]
(when-let [editor ^Editor (.getData event CommonDataKeys/EDITOR_EVEN_IF_INACTIVE)]
(let [[line character] (util/editor->cursor-position editor)]
(let [project (.getProject event)
[line character] (util/editor->cursor-position editor)]
(tasks/run-background-task!
project
"LSP: refactoring"
Expand Down Expand Up @@ -109,15 +110,15 @@
(.getDataContext event)
(.getInputEvent event))))

(defn -runActivity [_this ^Project project]
(defn -runActivity [_this ^Project _project]
(doseq [{:keys [name text description use-shortcut-of keyboard-shortcut]} clojure-lsp-commands]
(action/register-action! :id (str "ClojureLSP." (csk/->PascalCase name))
:title text
:description description
:icon Icons/CLOJURE
:keyboard-shortcut keyboard-shortcut
:use-shortcut-of use-shortcut-of
:on-performed (partial on-action-performed name text project)))
:on-performed (partial on-action-performed name text)))
(register-command! :id "code-lens-references"
:on-performed #'code-lens-references-performed)
(action/register-group! :id "ClojureLSP.Refactors"
Expand Down
2 changes: 1 addition & 1 deletion src/main/gramar/_ClojureLexer.flex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import static com.github.clojure_lsp.intellij.ClojureTokens.FORM_COMMENT;

WHITE_SPACE=\s+
LINE_COMMENT=;.*
FORM_COMMENT=#_\S*
FORM_COMMENT=#_
STR_CHAR=[^\\\"]|\\.|\\\"
STRING=\" {STR_CHAR}* \"
// octal numbers: 023, 023N, but not 023M
Expand Down

0 comments on commit fc517aa

Please sign in to comment.