From c51ba1732083df7f094b97b295d87c25ec5d8810 Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Wed, 17 Jul 2024 17:19:57 +0200 Subject: [PATCH 1/9] vscode: remove debugin message --- editors/vscode/src/client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/editors/vscode/src/client.ts b/editors/vscode/src/client.ts index 362ba7463..ad441ffe6 100644 --- a/editors/vscode/src/client.ts +++ b/editors/vscode/src/client.ts @@ -704,7 +704,6 @@ function sendGoalsRequest(position: Position, panel: WebviewPanel, docUri: Uri, return; } // Take focus back if the goal panel lost it. - window.showErrorMessage("Going through Goals"); if(!panel.active) { panel.reveal(2, false); } From 5148f2ba8c551959e0f0d5cd78e0e2bdeb48d41c Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Wed, 17 Jul 2024 17:24:24 +0200 Subject: [PATCH 2/9] vscode: set preserveFocus to true to prevent Goals panel from taking focus each time --- editors/vscode/src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editors/vscode/src/client.ts b/editors/vscode/src/client.ts index ad441ffe6..ccf3951c3 100644 --- a/editors/vscode/src/client.ts +++ b/editors/vscode/src/client.ts @@ -705,7 +705,7 @@ function sendGoalsRequest(position: Position, panel: WebviewPanel, docUri: Uri, } // Take focus back if the goal panel lost it. if(!panel.active) { - panel.reveal(2, false); + panel.reveal(2, true); } updateTerminalText(goals.logs); From a63f1d69dd9a93b790ba1d8ae3c8fe9f67911119 Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Mon, 30 Sep 2024 11:15:21 +0200 Subject: [PATCH 3/9] vscode: release minor revision to bring Goals panel to front whithout taking focus --- editors/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editors/vscode/package.json b/editors/vscode/package.json index e173c9d3f..fb7e5e3e9 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -8,7 +8,7 @@ "François Lefoulon ", "Ashish Barnawal " ], - "version": "0.2.2", + "version": "0.2.3", "publisher": "Deducteam", "engines": { "vscode": "^1.82.0" From 4a4fa6634a464a5e86a9520afeee1c5bf631ad11 Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Thu, 12 Dec 2024 10:34:02 +0100 Subject: [PATCH 4/9] document shortcuts for MacOs --- editors/vscode/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 61694845a..fc6678e72 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -5,14 +5,16 @@ This extension provides support for the [Lambdapi](https://github.com/Deducteam/ Goals are visualised in a panel on the right side of the editor. You can navigate in proof with the following key-bindings: -- ``Ctrl+Right``: go one step forward -- ``Ctrl+Left``: go one step backward -- ``Ctrl+Up``: go to the previous proof (or the beginning) -- ``Ctrl+Down``: go to the next proof (or the end) +- ``Ctrl+Right`` (``Ctrl+fn+Right`` in `Mac OS X`): go one step forward +- ``Ctrl+Left`` (``Ctrl+fn+left`` in `Mac OS X`): go one step backward +- ``Ctrl+Up``: go to the previous proof * (or the beginning) +- ``Ctrl+Down``: go to the next proof * (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed) - ``Shift+Alt+w``: center proof highlight in the current window + + * In `Mac OS X`, ``Ctrl+Up/Down/Down`` are the shortcuts for switching between workspaces. We recommand the definition of new key bindings for `go to the previous/next proof` in ``Code->Preferences->keyboard shortcuts`` (also reachable with `Command+K Command+S`). The advised shortcuts are `Ctrl+Option+Up` and `Ctrl+Option+Down` **Hover and go-to-definition** From 0e2483ba16e1e63e4aa709b63f90b2e7ed6101c7 Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Thu, 12 Dec 2024 12:18:01 +0100 Subject: [PATCH 5/9] vscode: split the shortcuts sections in README in two. One specific for Mac OS X --- editors/vscode/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index fc6678e72..00abe9a95 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -5,16 +5,27 @@ This extension provides support for the [Lambdapi](https://github.com/Deducteam/ Goals are visualised in a panel on the right side of the editor. You can navigate in proof with the following key-bindings: +***Linux and Windows*** + + - ``Ctrl+Right`` (``Ctrl+fn+Right`` in `Mac OS X`): go one step forward -- ``Ctrl+Left`` (``Ctrl+fn+left`` in `Mac OS X`): go one step backward +- ``Ctrl+Left`` (``Ctrl+fn+Left`` in `Mac OS X`): go one step backward - ``Ctrl+Up``: go to the previous proof * (or the beginning) - ``Ctrl+Down``: go to the next proof * (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) +- ``Ctrl+Alt+w``: toggle follow mode (proof highligsht is always centered in the window when keybindings are pressed) +- ``Shift+Alt+w``: center proof highlight in the current window + +***Mac OS X*** +- ``Ctrl+fn+Right``: go one step forward +- ``Ctrl+fn+Left``: go one step backward +- ``Ctrl+Enter``: go to the position of the cursor +- ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed) - ``Shift+Alt+w``: center proof highlight in the current window - - * In `Mac OS X`, ``Ctrl+Up/Down/Down`` are the shortcuts for switching between workspaces. We recommand the definition of new key bindings for `go to the previous/next proof` in ``Code->Preferences->keyboard shortcuts`` (also reachable with `Command+K Command+S`). The advised shortcuts are `Ctrl+Option+Up` and `Ctrl+Option+Down` + +For `go to the previous proof` and `go to the next proof` Key bindings need to be changed in Code->Preferences->keyboard shortcuts (also reachable with Command+K Command+S) because default ones are used by Mac OS X **Hover and go-to-definition** From 1ded9433d5275ad724bab4c27a9b21db2c9fa1bf Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Thu, 12 Dec 2024 12:22:50 +0100 Subject: [PATCH 6/9] vscode: minor corrections in README --- editors/vscode/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 00abe9a95..8389758d9 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -6,8 +6,6 @@ Goals are visualised in a panel on the right side of the editor. You can navigate in proof with the following key-bindings: ***Linux and Windows*** - - - ``Ctrl+Right`` (``Ctrl+fn+Right`` in `Mac OS X`): go one step forward - ``Ctrl+Left`` (``Ctrl+fn+Left`` in `Mac OS X`): go one step backward - ``Ctrl+Up``: go to the previous proof * (or the beginning) @@ -25,7 +23,7 @@ You can navigate in proof with the following key-bindings: - ``Ctrl+Alt+w``: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed) - ``Shift+Alt+w``: center proof highlight in the current window -For `go to the previous proof` and `go to the next proof` Key bindings need to be changed in Code->Preferences->keyboard shortcuts (also reachable with Command+K Command+S) because default ones are used by Mac OS X +For `go to the previous proof` and `go to the next proof`, Key bindings need to be changed in Code->Preferences->keyboard shortcuts (also reachable with Command+K Command+S) because default ones are used by Mac OS X **Hover and go-to-definition** From 8500d1e9abd7b96770b3b030022c9dde2e633884 Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Sun, 15 Dec 2024 22:33:13 +0100 Subject: [PATCH 7/9] vscode : fix shortcuts in README --- editors/vscode/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 8389758d9..f7ed6475b 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -6,8 +6,8 @@ Goals are visualised in a panel on the right side of the editor. You can navigate in proof with the following key-bindings: ***Linux and Windows*** -- ``Ctrl+Right`` (``Ctrl+fn+Right`` in `Mac OS X`): go one step forward -- ``Ctrl+Left`` (``Ctrl+fn+Left`` in `Mac OS X`): go one step backward +- ``Ctrl+Right``: go one step forward +- ``Ctrl+Left``: go one step backward - ``Ctrl+Up``: go to the previous proof * (or the beginning) - ``Ctrl+Down``: go to the next proof * (or the end) - ``Ctrl+Enter``: go to the position of the cursor From f7404c9d39cfa3c230db632874f257f6793d1daf Mon Sep 17 00:00:00 2001 From: Abdelghani ALIDRA Date: Tue, 17 Dec 2024 11:30:28 +0100 Subject: [PATCH 8/9] define specific keybindings for Mac OS and update README.md --- editors/vscode/README.md | 8 +++++--- editors/vscode/package.json | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index f7ed6475b..3ebba8b96 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -8,8 +8,8 @@ You can navigate in proof with the following key-bindings: ***Linux and Windows*** - ``Ctrl+Right``: go one step forward - ``Ctrl+Left``: go one step backward -- ``Ctrl+Up``: go to the previous proof * (or the beginning) -- ``Ctrl+Down``: go to the next proof * (or the end) +- ``Ctrl+Up``: go to the previous proof (or the beginning) +- ``Ctrl+Down``: go to the next proof (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highligsht is always centered in the window when keybindings are pressed) @@ -18,12 +18,14 @@ You can navigate in proof with the following key-bindings: ***Mac OS X*** - ``Ctrl+fn+Right``: go one step forward - ``Ctrl+fn+Left``: go one step backward +- ``Ctrl+Up``: go to the previous proof (or the beginning) +- ``Ctrl+Down``: go to the next proof (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed) - ``Shift+Alt+w``: center proof highlight in the current window -For `go to the previous proof` and `go to the next proof`, Key bindings need to be changed in Code->Preferences->keyboard shortcuts (also reachable with Command+K Command+S) because default ones are used by Mac OS X +Please note that these key bindings can be changed in Code->Preferences->keyboard shortcuts (also reachable with Ctrl+K Ctrl+S or Command+K Command+S in Mac OS X). **Hover and go-to-definition** diff --git a/editors/vscode/package.json b/editors/vscode/package.json index fb7e5e3e9..d8d7edbb5 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -138,12 +138,22 @@ { "key": "ctrl+up", "command": "extension.lambdapi.pv", - "when": "editorTextFocus && editorLangId == lp" + "when": "editorTextFocus && editorLangId == lp && (isWindows || isLinux)" }, { "key": "ctrl+down", "command": "extension.lambdapi.nx", - "when": "editorTextFocus && editorLangId == lp" + "when": "editorTextFocus && editorLangId == lp && (isWindows || isLinux)" + }, + { + "key": "ctrl+alt+up", + "command": "extension.lambdapi.pv", + "when": "editorTextFocus && editorLangId == lp && isMac" + }, + { + "key": "ctrl+alt+down", + "command": "extension.lambdapi.nx", + "when": "editorTextFocus && editorLangId == lp && isMac" } ], "snippets": [ From a5788a2a42fa30e54ea5f836219ca385c58a1bd0 Mon Sep 17 00:00:00 2001 From: Abdelghani Alidra Date: Tue, 17 Dec 2024 17:58:00 +0100 Subject: [PATCH 9/9] update documentation and changes and minor fixes in README --- doc/vscode.rst | 32 +++++++++++++++++++++----------- editors/vscode/CHANGES.md | 9 +++++++++ editors/vscode/README.md | 6 +++--- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/doc/vscode.rst b/doc/vscode.rst index f67936484..bcc958b94 100644 --- a/doc/vscode.rst +++ b/doc/vscode.rst @@ -23,17 +23,27 @@ Make sure you have a `lambdapi.pkg Preferences->keyboard shortcuts (also reachable with Ctrl+K Ctrl+S or Command+K Command+S in Mac OS X). **Hover and go-to-definition** diff --git a/editors/vscode/CHANGES.md b/editors/vscode/CHANGES.md index bb8d98305..8e23e95dc 100644 --- a/editors/vscode/CHANGES.md +++ b/editors/vscode/CHANGES.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/). +## Unreleased + +### Added + +### Fixed + +### Changed +- Changed the `go to the previous/next proof` commands shortcuts for Mac OS X operating system because previous ones are used by Mac OS. + ## [0.2.2] - code refactoring of the client for maintenability. - fix the bug that causes the proof navigation to malfunction when the `Goals` panel is closed by the user. Now the panel is recreated whenever needed. If focus is taken away frol the `Goals` panel, focus is given back to it when user starts navigating proofs again. diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 3ebba8b96..429f45127 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -18,14 +18,14 @@ You can navigate in proof with the following key-bindings: ***Mac OS X*** - ``Ctrl+fn+Right``: go one step forward - ``Ctrl+fn+Left``: go one step backward -- ``Ctrl+Up``: go to the previous proof (or the beginning) -- ``Ctrl+Down``: go to the next proof (or the end) +- ``Ctrl+Alt+Up``: go to the previous proof (or the beginning) +- ``Ctrl+Alt+Down``: go to the next proof (or the end) - ``Ctrl+Enter``: go to the position of the cursor - ``Ctrl+Alt+c``: toggle cursor mode (proof highlight follows the cursor or not) - ``Ctrl+Alt+w``: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed) - ``Shift+Alt+w``: center proof highlight in the current window -Please note that these key bindings can be changed in Code->Preferences->keyboard shortcuts (also reachable with Ctrl+K Ctrl+S or Command+K Command+S in Mac OS X). +Please note that these key-bindings can be changed in Code->Preferences->keyboard shortcuts (also reachable with Ctrl+K Ctrl+S or Command+K Command+S in Mac OS X). **Hover and go-to-definition**