Skip to content

Commit 6931d3a

Browse files
committed
Add [r|d]estructure keys refactorings
1 parent 8ad6f5f commit 6931d3a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

package.json

+12
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,18 @@
17341734
"category": "clojure-lsp Refactor",
17351735
"enablement": "editorLangId == clojure && clojureLsp:active"
17361736
},
1737+
{
1738+
"command": "clojureLsp.refactor.destructureKeys",
1739+
"title": "Destructure Keys",
1740+
"category": "clojure-lsp Refactor",
1741+
"enablement": "editorLangId == clojure && clojureLsp:active"
1742+
},
1743+
{
1744+
"command": "clojureLsp.refactor.restructureKeys",
1745+
"title": "Restructure Keys",
1746+
"category": "clojure-lsp Refactor",
1747+
"enablement": "editorLangId == clojure && clojureLsp:active"
1748+
},
17371749
{
17381750
"command": "clojureLsp.refactor.addMissingLibspec",
17391751
"title": "Add Missing Require",

src/lsp/main.ts

+7
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ const clojureLspCommands: ClojureLspCommand[] = [
255255
command: 'extract-function',
256256
extraParamFn: makePromptForInput('Function name'),
257257
},
258+
{
259+
command: 'destructure-keys',
260+
},
261+
{
262+
command: 'restructure-keys',
263+
extraParamFn: makePromptForInput('Bind to'),
264+
},
258265
];
259266

260267
function sendCommandRequest(command: string, args: (number | string)[]): void {

0 commit comments

Comments
 (0)