Skip to content

Commit

Permalink
[goals] Show goals on click (+ configuration options).
Browse files Browse the repository at this point in the history
We allow to show goals on click, on cursor movement, or on
both. User-configurable.

Fixes #89
  • Loading branch information
ejgallego committed Dec 26, 2022
1 parent c5d0694 commit 23ac43e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- Send `$/coq/fileProgress` progress notifications from server,
similarly to what Lean does; display them in Code's right gutter
(@ejgallego, #106, fixes #54)
- Show goals on click by default, allow users to configure the behavior
(@ejgallego, #116, fixes #89)

# coq-lsp 0.1.0: Memory
-----------------------
Expand Down
7 changes: 7 additions & 0 deletions editor/code/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ export function activate(context: ExtensionContext): void {

// XXX: Fix this mess with the lifetime of the panel
goalPanel = panelFactory(context);

context.subscriptions.push(window.onDidChangeTextEditorSelection((evt : vscode.TextEditorSelectionChangeEvent) => {
if(evt.kind == vscode.TextEditorSelectionChangeKind.Mouse) {
goals(evt.textEditor);
}
}));
};

const progressDecoration = window.createTextEditorDecorationType(
{ overviewRulerColor: 'rgba(255,165,0,0.5)', overviewRulerLane: OverviewRulerLane.Left}
);
Expand Down

0 comments on commit 23ac43e

Please sign in to comment.