Skip to content

Commit 0ab546f

Browse files
committed
Add support for more paredit actions
1 parent 62677f1 commit 0ab546f

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
- Add support for `forward`, `backward`, `forward-select`, `backward-select` paredit actions. #72
6+
57
## 3.2.0
68

79
- Bump clj4intellij to 0.7.1

docs/features.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,19 @@ This plugin relies on [clojure-lsp](https://clojure-lsp.io/) features and [lsp4i
113113
> <kbd>Alt</kbd> + <kbd>k</kbd>
114114
115115
![](../images/paredit-kill.gif)
116+
117+
##### Forward sexpr
118+
119+
> <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>]</kbd>
120+
121+
##### Forward select sexpr
122+
123+
> <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>]</kbd>
124+
125+
##### Backward sexpr
126+
127+
> <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>[</kbd>
128+
129+
##### Backward select sexpr
130+
131+
> <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>[</kbd>

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
@@ -92,7 +92,7 @@
9292
:foreground (s.color/color 110 110 110)) "wrap"]]
9393
(remove nil?)))))
9494

95-
(def-extension GeneralSettingsConfigurable []
95+
(def-extension ClojureGeneralSettingsConfigurable []
9696
Configurable
9797
(createComponent [_]
9898
(let [project (first (db/all-projects))

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@
7272
{:name "backward-slurp" :text "Slurp backward" :description "Slurp backward (Paredit)" :keyboard-shortcut {:first "alt shift CLOSE_BRACKET" :replace-all true}}
7373
{:name "backward-barf" :text "Barf backward" :description "Barf backward (Paredit)" :keyboard-shortcut {:first "alt shift OPEN_BRACKET" :replace-all true}}
7474
{:name "raise-sexp" :text "Raise sexpr" :description "Raise current sexpr (Paredit)" :keyboard-shortcut {:first "alt R" :replace-all true}}
75-
{:name "kill-sexp" :text "Kill sexpr" :description "Kill current sexpr (Paredit)" :keyboard-shortcut {:first "alt K" :replace-all true}}])
75+
{:name "kill-sexp" :text "Kill sexpr" :description "Kill current sexpr (Paredit)" :keyboard-shortcut {:first "alt K" :replace-all true}}
76+
{:name "forward" :text "Move forward" :description "Move cursor forward a sexpr (Paredit)" :keyboard-shortcut {:first "ctrl alt CLOSE_BRACKET" :replace-all true}}
77+
{:name "forward-select" :text "Select forward" :description "Select forward a sexpr (Paredit)" :keyboard-shortcut {:first "ctrl shift alt CLOSE_BRACKET" :replace-all true}}
78+
{:name "backward" :text "Move backward" :description "Move cursor backward a sexpr (Paredit)" :keyboard-shortcut {:first "ctrl alt OPEN_BRACKET" :replace-all true}}
79+
{:name "backward-select" :text "Select backward" :description "Select backward a sexpr (Paredit)" :keyboard-shortcut {:first "ctrl shift alt OPEN_BRACKET" :replace-all true}}])
7680

7781
(defn ^:private on-action-performed [command-name text ^AnActionEvent event]
7882
(when-let [editor ^Editor (.getData event CommonDataKeys/EDITOR_EVEN_IF_INACTIVE)]

0 commit comments

Comments
 (0)