Skip to content

Commit

Permalink
[code] Rename sentenceBack to sentencePrevious
Browse files Browse the repository at this point in the history
Co-authored-by: Ali Caglayan <alizter@gmail.com>
  • Loading branch information
ejgallego and Alizter committed May 17, 2024
1 parent ff1f159 commit fc47d40
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
- new VSCode commands to allow to move one sentence backwards /
forward, this is particularly useful when combined with lazy
checking mode (@ejgallego, #671, fixes #263, fixes #580)
- VSCode commands `coq-lsp.sentenceNext` / `coq-lsp.sentenceBack` are
now bound by default to `Alt + N` / `Alt + P` keybindings
- VSCode commands `coq-lsp.sentenceNext` / `coq-lsp.sentencePrevious`
are now bound by default to `Alt + N` / `Alt + P` keybindings
(@ejgallego, #718)
- change diagnostic `extra` field to `data`, so we now conform to the
LSP spec, include the data only when the `send_diags_extra_data`
Expand Down Expand Up @@ -142,7 +142,7 @@
restart. This fixes some bugs on extension restart (finally!)
(@ejgallgo, #719)
- Center the view if cursor goes out of scope in
`sentenceNext/sentenceBack` (@ejgallego, #718)
`sentenceNext/sentencePrevious` (@ejgallego, #718)

# coq-lsp 0.1.8.1: Spring fix
-----------------------------
Expand Down
4 changes: 2 additions & 2 deletions editor/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"title": "Coq LSP: try to jump to next Coq sentence"
},
{
"command": "coq-lsp.sentenceBack",
"command": "coq-lsp.sentencePrevious",
"title": "Coq LSP: try to jump to previous Coq sentence"
},
{
Expand All @@ -133,7 +133,7 @@
"when": "editorTextFocus && (editorLangId == coq || editorTextFocus && editorLangId == markdown)"
},
{
"command": "coq-lsp.sentenceBack",
"command": "coq-lsp.sentencePrevious",
"key": "Alt+P",
"mac": "cmd+P",
"when": "editorTextFocus && (editorLangId == coq || editorTextFocus && editorLangId == markdown)"
Expand Down
4 changes: 2 additions & 2 deletions editor/code/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { CoqLspClientConfig, CoqLspServerConfig, CoqSelector } from "./config";
import { InfoPanel, goalReq } from "./goals";
import { FileProgressManager } from "./progress";
import { coqPerfData, PerfDataView } from "./perf";
import { sentenceNext, sentenceBack } from "./edit";
import { sentenceNext, sentencePrevious } from "./edit";
import { HeatMap, HeatMapConfig } from "./heatmap";
import { debounce, throttle } from "throttle-debounce";

Expand Down Expand Up @@ -461,7 +461,7 @@ export function activateCoqLSP(
coqEditorCommand("save", saveDocument);

coqEditorCommand("sentenceNext", sentenceNext);
coqEditorCommand("sentenceBack", sentenceBack);
coqEditorCommand("sentencePrevious", sentencePrevious);

coqEditorCommand("heatmap.toggle", heatMapToggle);

Expand Down
2 changes: 1 addition & 1 deletion editor/code/src/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function setSelection(editor: TextEditor, newCursor: Position) {
);
}

export function sentenceBack(editor: TextEditor) {
export function sentencePrevious(editor: TextEditor) {
// Slice from the beginning of the document
let cursor = editor.selection.active;
let range = new Range(editor.document.positionAt(0), cursor);
Expand Down
4 changes: 2 additions & 2 deletions etc/doc/USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ facilities. In VSCode, these settings can be usually displayed in the
By default, `coq-lsp` will follow cursor and show goals at cursor
position. This can be tweaked in options.

The `coq-lsp.sentenceNext` and `coq-lsp.sentenceBack` commands will
The `coq-lsp.sentenceNext` and `coq-lsp.sentencePrevious` commands will
try to move the cursor one Coq sentence forward / backwards. These
commands are bound by default to `Alt + P` / `Alt + N` (`Cmd` on
commands are bound by default to `Alt + N` / `Alt + P` (`Cmd` on
MacOS).

### Incremental proof edition
Expand Down

0 comments on commit fc47d40

Please sign in to comment.