From 7fb02f21ed47105d07df2dac47fc534b7e016cb0 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Fri, 29 Mar 2024 23:26:33 -0700 Subject: [PATCH 01/10] first pass implementation of multicursor selectCurrentForm --- src/cursor-doc/paredit.ts | 41 +++++++++++++++++++ .../unit/paredit/commands-test.ts | 26 ++++++++++++ src/paredit/commands.ts | 4 ++ src/paredit/extension.ts | 7 ++++ 4 files changed, 78 insertions(+) diff --git a/src/cursor-doc/paredit.ts b/src/cursor-doc/paredit.ts index a4b3b7789..f6a23f98a 100644 --- a/src/cursor-doc/paredit.ts +++ b/src/cursor-doc/paredit.ts @@ -49,6 +49,47 @@ export function selectRange(doc: EditableDocument, ranges: ModelEditRange[]) { growSelectionStack(doc, ranges); } +function getFormSelection( + doc: EditableDocument, + offset: number, + topLevel: boolean +): ModelEditSelection | undefined { + const idx = offset; + const cursor = doc.getTokenCursor(idx); + const range = topLevel ? cursor.rangeForDefun(idx) : cursor.rangeForCurrentForm(idx); + if (range) { + return new ModelEditSelection(range[0], range[1]); + } else { + return undefined; + } +} + +export function selectForm( + // doc: MirroredDocument, + doc: EditableDocument, + toplevel: boolean, + selections = doc.selections +) { + // const editor = util.getActiveTextEditor(), + // doc = util.getDocument(document), + // selection = doc.selections[0]; + + const newSels = selections.map((sel) => { + // const selection = sel.asSelection(vscDoc); + const selection = sel; + if (selection.isCursor) { + // const codeSelection = selectionFn(vscDoc, selection.active, toplevel); + const codeSelection = getFormSelection(doc, selection.active, toplevel); + if (codeSelection) { + return codeSelection; + } + } + return sel; + }); + + doc.selections = newSels; +} + export function selectRangeForward( doc: EditableDocument, ranges: ModelEditRange[], diff --git a/src/extension-test/unit/paredit/commands-test.ts b/src/extension-test/unit/paredit/commands-test.ts index 93d4a5f8a..8ca3fd20a 100644 --- a/src/extension-test/unit/paredit/commands-test.ts +++ b/src/extension-test/unit/paredit/commands-test.ts @@ -333,6 +333,32 @@ describe('paredit commands', () => { }); describe('selection', () => { + describe('selectCurrentForm', () => { + it('Single-cursor:', () => { + const a = docFromTextNotation( + '(defn|1 [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(:|a)' + ); + const aSelections = a.selections; + const b = docFromTextNotation( + '(defn [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(|:a|)' + ); + handlers.selectCurrentForm(a, false); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + it('Multi-cursor:', () => { + const a = docFromTextNotation( + '(defn|1 |2[a b]•(let [|3^js aa |4#p (+ a)•<5b b<5]•{:a aa•:b b}))•(:|a)' + ); + const aSelections = a.selections; + const b = docFromTextNotation( + '(|1defn|1 |2[a b]|2•(let [|3^js aa|3 |4#p (+ a)|4•<5b b<5]•{:a aa•:b b}))•(|:a|)' + ); + handlers.selectCurrentForm(a, true); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + }); describe('rangeForDefun', () => { it('Single-cursor:', () => { const a = docFromTextNotation( diff --git a/src/paredit/commands.ts b/src/paredit/commands.ts index 9e29d28f8..b90f8b2ed 100644 --- a/src/paredit/commands.ts +++ b/src/paredit/commands.ts @@ -56,6 +56,10 @@ export function openList(doc: EditableDocument, isMulti: boolean = false) { // SELECTION +export function selectCurrentForm(doc: EditableDocument, isMulti: boolean = false) { + paredit.selectForm(doc, false, isMulti ? doc.selections : [doc.selections[0]]); +} + export function rangeForDefun(doc: EditableDocument, isMulti: boolean) { const selections = isMulti ? doc.selections : [doc.selections[0]]; const ranges = selections.map((s) => paredit.rangeForDefun(doc, s.active)); diff --git a/src/paredit/extension.ts b/src/paredit/extension.ts index a30c421e0..e705c2f96 100644 --- a/src/paredit/extension.ts +++ b/src/paredit/extension.ts @@ -114,6 +114,13 @@ const pareditCommands: PareditCommand[] = [ }, // SELECTING + { + command: 'paredit.selectCurrentForm', + handler: (doc: EditableDocument) => { + const isMulti = multiCursorEnabled(); + handlers.selectCurrentForm(doc, isMulti); + }, + }, { command: 'paredit.rangeForDefun', handler: (doc: EditableDocument) => { From 6b615cbe0d3fe625d9dac656f84d6b08c423d7a1 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:37:39 -0700 Subject: [PATCH 02/10] simplify selectForm code --- src/cursor-doc/paredit.ts | 35 +++------ .../unit/paredit/commands-test.ts | 75 ++++++++++++++++++- 2 files changed, 83 insertions(+), 27 deletions(-) diff --git a/src/cursor-doc/paredit.ts b/src/cursor-doc/paredit.ts index f6a23f98a..12406d803 100644 --- a/src/cursor-doc/paredit.ts +++ b/src/cursor-doc/paredit.ts @@ -49,37 +49,26 @@ export function selectRange(doc: EditableDocument, ranges: ModelEditRange[]) { growSelectionStack(doc, ranges); } -function getFormSelection( - doc: EditableDocument, - offset: number, - topLevel: boolean -): ModelEditSelection | undefined { - const idx = offset; - const cursor = doc.getTokenCursor(idx); - const range = topLevel ? cursor.rangeForDefun(idx) : cursor.rangeForCurrentForm(idx); - if (range) { - return new ModelEditSelection(range[0], range[1]); - } else { - return undefined; - } -} - +// TODO: implement via growSelectionStack export function selectForm( // doc: MirroredDocument, doc: EditableDocument, - toplevel: boolean, + topLevel: boolean, selections = doc.selections ) { - // const editor = util.getActiveTextEditor(), - // doc = util.getDocument(document), - // selection = doc.selections[0]; - const newSels = selections.map((sel) => { - // const selection = sel.asSelection(vscDoc); const selection = sel; if (selection.isCursor) { - // const codeSelection = selectionFn(vscDoc, selection.active, toplevel); - const codeSelection = getFormSelection(doc, selection.active, toplevel); + let codeSelection; + const cursor = doc.getTokenCursor(selection.active); + const range = topLevel + ? cursor.rangeForDefun(selection.active) + : cursor.rangeForCurrentForm(selection.active); + if (range) { + codeSelection = new ModelEditSelection(range[0], range[1]); + } else { + codeSelection = undefined; + } if (codeSelection) { return codeSelection; } diff --git a/src/extension-test/unit/paredit/commands-test.ts b/src/extension-test/unit/paredit/commands-test.ts index 8ca3fd20a..3133d4d25 100644 --- a/src/extension-test/unit/paredit/commands-test.ts +++ b/src/extension-test/unit/paredit/commands-test.ts @@ -334,19 +334,19 @@ describe('paredit commands', () => { describe('selection', () => { describe('selectCurrentForm', () => { - it('Single-cursor:', () => { + it('Single-cursor: handles cases like reader tags/metadata + keeps other selections ', () => { const a = docFromTextNotation( - '(defn|1 [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(:|a)' + '(defn|1 [a b]•(let [^js a|a #p (+ a)•b b]•{:a aa•:b b}))•(:a)' ); const aSelections = a.selections; const b = docFromTextNotation( - '(defn [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(|:a|)' + '(defn [a b]•(let [|^js aa| #p (+ a)•b b]•{:a aa•:b b}))•(:a)' ); handlers.selectCurrentForm(a, false); expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); expect(a.selectionsStack).toEqual([aSelections, b.selections]); }); - it('Multi-cursor:', () => { + it('Multi-cursor: handles cases like reader tags/metadata + keeps other selections ', () => { const a = docFromTextNotation( '(defn|1 |2[a b]•(let [|3^js aa |4#p (+ a)•<5b b<5]•{:a aa•:b b}))•(:|a)' ); @@ -358,6 +358,73 @@ describe('paredit commands', () => { expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); expect(a.selectionsStack).toEqual([aSelections, b.selections]); }); + + it('Single-cursor: handles cursor at a distance from form', () => { + const a = docFromTextNotation('[|1 a b |2c d { e f}|3 g |]'); + const aSelections = a.selections; + const b = docFromTextNotation('[ a b c d { e f} |g| ]'); + handlers.selectCurrentForm(a, false); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + it('Multi-cursor: handles cursor at a distance from form', () => { + const a = docFromTextNotation('[|1 a b |2c d { e f}|3 g |]'); + const aSelections = a.selections; + const b = docFromTextNotation('[ |1a|1 b |2c|2 d |3{ e f}|3 |g| ]'); + handlers.selectCurrentForm(a, true); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + + it('Single-cursor: collapses overlapping selections', () => { + const a = docFromTextNotation( + '(de|1fn| [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(:a)' + ); + const aSelections = a.selections; + const b = docFromTextNotation( + '(|defn| [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(:a)' + ); + handlers.selectCurrentForm(a, false); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + it('Multi-cursor: collapses overlapping selections', () => { + const a = docFromTextNotation( + '(de|5fn|1 |2[a b]•(let [|3^js aa |4#p (+ a)•<5b b<5]•{:a aa•:b b}))•(:|a)' + ); + const aSelections = a.selections; + const b = docFromTextNotation( + '(|1defn|1 |2[a b]|2•(let [|3^js aa|3 |4#p (+ a)|4•<5b b<5]•{:a aa•:b b}))•(|:a|)' + ); + handlers.selectCurrentForm(a, true); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + + it('Single-cursor: collapses overlapping selections preferring the larger one', () => { + const a = docFromTextNotation( + '(de|1fn| [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(:a)' + ); + const aSelections = a.selections; + const b = docFromTextNotation( + '(|defn| [a b]•(let [^js aa #p (+ a)•b b]•{:a aa•:b b}))•(:a)' + ); + handlers.selectCurrentForm(a, false); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); + it('Multi-cursor: collapses overlapping selections preferring the larger one', () => { + const a = docFromTextNotation( + '(defn [a b]•(let [^js aa #p (+ a)•b |b]|1•|3{:a a|2a•:b b}))•(:a)' + ); + const aSelections = a.selections; + const b = docFromTextNotation( + '(defn [a b]•(let |1[^js aa #p (+ a)•b b]|1•|3{:a aa•:b b}|3))•(:a)' + ); + handlers.selectCurrentForm(a, true); + expect(textNotationFromDoc(a)).toEqual(textNotationFromDoc(b)); + expect(a.selectionsStack).toEqual([aSelections, b.selections]); + }); }); describe('rangeForDefun', () => { it('Single-cursor:', () => { From 020105ae4b328ef00b802e0531fe271b03335be4 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:41:09 -0700 Subject: [PATCH 03/10] reimplement with growSelectionStack --- src/cursor-doc/paredit.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/cursor-doc/paredit.ts b/src/cursor-doc/paredit.ts index 12406d803..1cfc86a42 100644 --- a/src/cursor-doc/paredit.ts +++ b/src/cursor-doc/paredit.ts @@ -49,13 +49,7 @@ export function selectRange(doc: EditableDocument, ranges: ModelEditRange[]) { growSelectionStack(doc, ranges); } -// TODO: implement via growSelectionStack -export function selectForm( - // doc: MirroredDocument, - doc: EditableDocument, - topLevel: boolean, - selections = doc.selections -) { +export function selectForm(doc: EditableDocument, topLevel: boolean, selections = doc.selections) { const newSels = selections.map((sel) => { const selection = sel; if (selection.isCursor) { @@ -76,7 +70,7 @@ export function selectForm( return sel; }); - doc.selections = newSels; + growSelectionStack(doc, newSels.map(_.property('asDirectedRange'))); } export function selectRangeForward( From 84d9c7de88cdd9b42dd47dcfe50ec8aea0cd6134 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:45:22 -0700 Subject: [PATCH 04/10] swap old command with new in extension manifest --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 46b55e33c..1bca248d7 100644 --- a/package.json +++ b/package.json @@ -1343,12 +1343,6 @@ "enablement": "calva:connected", "category": "Calva" }, - { - "command": "calva.selectCurrentForm", - "title": "Select Current Form", - "category": "Calva", - "enablement": "editorLangId == clojure" - }, { "command": "calva.clearInlineResults", "title": "Clear Inline Evaluation Results", @@ -1567,6 +1561,12 @@ "title": "Move Cursor Forward to List End/Close", "enablement": "editorLangId == clojure" }, + { + "category": "Calva", + "command": "paredit.selectCurrentForm", + "title": "Select Current Form", + "enablement": "editorLangId == clojure" + }, { "category": "Calva Paredit", "command": "paredit.selectForwardSexp", From a32e2a7a9d8d697dc4f264862435747d85ec433a Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:46:05 -0700 Subject: [PATCH 05/10] remove old implementation --- src/extension.ts | 2 -- src/select.ts | 25 ------------------------- 2 files changed, 27 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index c3a436ec2..1c19994d6 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -16,7 +16,6 @@ import * as definition from './providers/definition'; import { CalvaSignatureHelpProvider } from './providers/signature'; import testRunner from './testRunner'; import annotations from './providers/annotations'; -import * as select from './select'; import eval from './evaluate'; import refresh from './refresh'; import * as greetings from './greet'; @@ -258,7 +257,6 @@ async function activate(context: vscode.ExtensionContext) { runCustomREPLCommand: snippets.evaluateCustomCodeSnippetCommand, runNamespaceTests: () => testRunner.runNamespaceTestsCommand(testController), runTestUnderCursor: () => testRunner.runTestUnderCursorCommand(testController), - selectCurrentForm: select.selectCurrentForm, sendCurrentFormToOutputWindow: outputWindow.appendCurrentForm, openFiddleForSourceFile: fiddleFiles.openFiddleForSourceFile, evaluateFiddleForSourceFile: fiddleFiles.evaluateFiddleForSourceFile, diff --git a/src/select.ts b/src/select.ts index 5bcd4d2dd..fd755fb24 100644 --- a/src/select.ts +++ b/src/select.ts @@ -37,28 +37,3 @@ export function getEnclosingFormSelection( } } } - -function selectForm( - document = {}, - selectionFn: ( - doc: vscode.TextDocument, - pos: vscode.Position, - topLevel: boolean - ) => vscode.Selection | undefined, - toplevel: boolean -) { - const editor = util.getActiveTextEditor(), - doc = util.getDocument(document), - selection = editor.selections[0]; - - if (selection.isEmpty) { - const codeSelection = selectionFn(doc, selection.active, toplevel); - if (codeSelection) { - editor.selections = [codeSelection]; - } - } -} - -export function selectCurrentForm(document = {}) { - selectForm(document, getFormSelection, false); -} From df34641117290e19836b2ae87bb9126d3e1e0527 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:47:31 -0700 Subject: [PATCH 06/10] rename new impl functions --- src/cursor-doc/paredit.ts | 6 +++++- src/paredit/commands.ts | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cursor-doc/paredit.ts b/src/cursor-doc/paredit.ts index 1cfc86a42..3fcc489c6 100644 --- a/src/cursor-doc/paredit.ts +++ b/src/cursor-doc/paredit.ts @@ -49,7 +49,11 @@ export function selectRange(doc: EditableDocument, ranges: ModelEditRange[]) { growSelectionStack(doc, ranges); } -export function selectForm(doc: EditableDocument, topLevel: boolean, selections = doc.selections) { +export function selectCurrentForm( + doc: EditableDocument, + topLevel: boolean, + selections = doc.selections +) { const newSels = selections.map((sel) => { const selection = sel; if (selection.isCursor) { diff --git a/src/paredit/commands.ts b/src/paredit/commands.ts index b90f8b2ed..6ccf7208c 100644 --- a/src/paredit/commands.ts +++ b/src/paredit/commands.ts @@ -57,9 +57,8 @@ export function openList(doc: EditableDocument, isMulti: boolean = false) { // SELECTION export function selectCurrentForm(doc: EditableDocument, isMulti: boolean = false) { - paredit.selectForm(doc, false, isMulti ? doc.selections : [doc.selections[0]]); + paredit.selectCurrentForm(doc, false, isMulti ? doc.selections : [doc.selections[0]]); } - export function rangeForDefun(doc: EditableDocument, isMulti: boolean) { const selections = isMulti ? doc.selections : [doc.selections[0]]; const ranges = selections.map((s) => paredit.rangeForDefun(doc, s.active)); From b7101ebf4060fec0655e421717ba06b5fd30b02f Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 14:03:19 -0700 Subject: [PATCH 07/10] add changelog entry for new selectCurrentForm, closes #2476 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce4dc623d..8967d20a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ Changes to Calva. ## [Unreleased] -- [Implement experimental support for multicursor rewrap commands](https://github.com/BetterThanTomorrow/calva/issues/2448). Enable `calva.paredit.multicursor` in your settings to try it out. Closes [#2473](https://github.com/BetterThanTomorrow/calva/issues/2473) +- [Implement experimental support for multicursor selectCurrentForm command](https://github.com/BetterThanTomorrow/calva/issues/2476). Enable `calva.paredit.multicursor` in your settings to try it out. Closes [#2476](https://github.com/BetterThanTomorrow/calva/issues/2476) +- [Implement experimental support for multicursor rewrap commands](https://github.com/BetterThanTomorrow/calva/issues/2473). Enable `calva.paredit.multicursor` in your settings to try it out. Closes [#2473](https://github.com/BetterThanTomorrow/calva/issues/2473) ## [2.0.432] - 2024-03-26 From adf4a2eaa525ead3b71254e9d349715200a3bcbd Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sat, 30 Mar 2024 14:36:57 -0700 Subject: [PATCH 08/10] fix multicursor paredit enty and a typo in paredit docs --- docs/site/paredit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/paredit.md b/docs/site/paredit.md index c92e27161..0b589cba1 100644 --- a/docs/site/paredit.md +++ b/docs/site/paredit.md @@ -125,7 +125,7 @@ Default keybinding | Action | Description You can have the *kill* commands always copy the deleted code to the clipboard by setting `calva.paredit.killAlsoCutsToClipboard` to `true`. If you want to do this more on-demand, you can kill text by using the [selection commands](#selecting) and then *Cut* once you have the selection. !!! Note "clojure-lsp drag fwd/back overlap" - As an experimental feature, the two commands for dragging forms forward and backward have clojure-lsp alternativs. See the [clojure-lsp](clojure-lsp.md#clojure-lsp-drag-fwdback) page. + As an experimental feature, the two commands for dragging forms forward and backward have clojure-lsp alternatives. See the [clojure-lsp](clojure-lsp.md#clojure-lsp-drag-fwdback) page. ### Drag bindings forward/backward From 2957cc90ff549b397f4fa0da66ab332315f82de7 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:07:34 -0700 Subject: [PATCH 09/10] reuse existing selectCurrentForm cmd id --- package.json | 8 ++++---- src/paredit/extension.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1bca248d7..4ce55afa5 100644 --- a/package.json +++ b/package.json @@ -1562,8 +1562,8 @@ "enablement": "editorLangId == clojure" }, { - "category": "Calva", - "command": "paredit.selectCurrentForm", + "category": "Calva Paredit", + "command": "calva.selectCurrentForm", // legacy id for backward compat "title": "Select Current Form", "enablement": "editorLangId == clojure" }, @@ -2151,7 +2151,7 @@ "when": "calva:keybindingsEnabled" }, { - "command": "calva.selectCurrentForm", + "command": "calva.selectCurrentForm", // legacy id for backward compat "key": "ctrl+alt+c ctrl+s", "when": "calva:keybindingsEnabled && editorLangId == clojure && editorTextFocus" }, @@ -3078,7 +3078,7 @@ }, { "when": "editorLangId == clojure", - "command": "calva.selectCurrentForm", + "command": "calva.selectCurrentForm", // legacy id for backward compat "group": "calva/a-structural-editing" }, { diff --git a/src/paredit/extension.ts b/src/paredit/extension.ts index e705c2f96..e7899d973 100644 --- a/src/paredit/extension.ts +++ b/src/paredit/extension.ts @@ -115,7 +115,7 @@ const pareditCommands: PareditCommand[] = [ // SELECTING { - command: 'paredit.selectCurrentForm', + command: 'calva.selectCurrentForm', // legacy command id for backward compat handler: (doc: EditableDocument) => { const isMulti = multiCursorEnabled(); handlers.selectCurrentForm(doc, isMulti); From 5e466d84d4db69f6124b211353f038ecdbc03c01 Mon Sep 17 00:00:00 2001 From: Rayat M Rahman <22646419+riotrah@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:14:09 -0700 Subject: [PATCH 10/10] oops... package.json is not jsonc, remove comments --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4ce55afa5..1770cb843 100644 --- a/package.json +++ b/package.json @@ -1563,7 +1563,7 @@ }, { "category": "Calva Paredit", - "command": "calva.selectCurrentForm", // legacy id for backward compat + "command": "calva.selectCurrentForm", "title": "Select Current Form", "enablement": "editorLangId == clojure" }, @@ -2151,7 +2151,7 @@ "when": "calva:keybindingsEnabled" }, { - "command": "calva.selectCurrentForm", // legacy id for backward compat + "command": "calva.selectCurrentForm", "key": "ctrl+alt+c ctrl+s", "when": "calva:keybindingsEnabled && editorLangId == clojure && editorTextFocus" }, @@ -3078,7 +3078,7 @@ }, { "when": "editorLangId == clojure", - "command": "calva.selectCurrentForm", // legacy id for backward compat + "command": "calva.selectCurrentForm", "group": "calva/a-structural-editing" }, {