Skip to content

Commit

Permalink
Reopen the goals panel if closed when navigating proofs (Deducteam#1068)
Browse files Browse the repository at this point in the history
* vscode : first refactoring using browser.ts

* vsce refactoring : adding clientFactory

* code reformating of vscode/src/client.ts

* vscode client.ts refactoring : moving handlers into activate function

* vscode client.ts refactoring : geting ride of the context parameter in handlers functions

* vscode client.ts refactoring : doing same with getNextProof

* vscode: code refactoring, use of browser.ts and config.ts

* vscode: code refactoring, moving everything to start instead of restart

* code refactoring moving register commands outside activateLsp method

* fix/ReopenGoalsPan : add on didDispose to webview

* fix/ReopenGoalsPan: add code to reopen panel when navigation proofs

* fix/ReopenGoalsPan: release focus after Goals panel creation

* refactor : get ride of debug messages

* vscode : added comments to code

* fix/ReopenGoalsPan: remove redundant check on info panel

* fix/ReopenGoalsPan: update CHANGE.md
  • Loading branch information
Alidra authored Mar 19, 2024
1 parent 0822848 commit abe073d
Show file tree
Hide file tree
Showing 9 changed files with 535 additions and 354 deletions.
2 changes: 2 additions & 0 deletions editors/vscode/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
- 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.

## [0.1.2] - 2020-12-10
- use vscode configuration for lambdapi.path to call the lambdapi LSP server
Expand Down
2 changes: 1 addition & 1 deletion editors/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
]
},
"main": "out/src/client.js",
"main": "out/src/browser.js",
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
Expand Down
22 changes: 22 additions & 0 deletions editors/vscode/src/browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ExtensionContext, window } from "vscode";
import { LanguageClient } from "vscode-languageclient/node";
import { activateClientLSP, ClientFactoryType, deactivateClientLSP } from "./client";

export function activate(context: ExtensionContext): void {
const cf: ClientFactoryType = (context, clientOptions, wsConfig, lspServerPath) => {
let serverOptions = {
command: lspServerPath,
args: ['lsp']
};
return new LanguageClient(
"lambdapi",
"lambdapi language server",
serverOptions,
clientOptions);
};
activateClientLSP(context, cf);
}

export function deactivate() {
deactivateClientLSP();
}
Loading

0 comments on commit abe073d

Please sign in to comment.