File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
21
21
22
22
import Client from './client' ;
23
23
import { updateServerOnConfigurationChange } from './configuration' ;
24
- import { checkVersion } from './utilities/versioning' ;
24
+ import { checkVersion , getCoqdocUrl } from './utilities/versioning' ;
25
25
import { initializeDecorations } from './Decorations' ;
26
26
import GoalPanel from './panels/GoalPanel' ;
27
27
import SearchViewProvider from './panels/SearchViewProvider' ;
@@ -254,7 +254,8 @@ export function activate(context: ExtensionContext) {
254
254
commands . executeCommand ( 'workbench.action.openWalkthrough' , 'maximedenes.vscoq#coq.welcome' , false ) ;
255
255
} ) ;
256
256
registerVscoqTextCommand ( 'showManual' , ( ) => {
257
- commands . executeCommand ( 'simpleBrowser.show' , 'https://coq.inria.fr/doc/master/refman/index.html' ) ;
257
+ const url = getCoqdocUrl ( coqTM . getCoqVersion ( ) ) ;
258
+ commands . executeCommand ( 'simpleBrowser.show' , url ) ;
258
259
} ) ;
259
260
registerVscoqTextCommand ( 'displayProofView' , ( ) => {
260
261
const editor = window . activeTextEditor ? window . activeTextEditor : window . visibleTextEditors [ 0 ] ;
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ import { window, ExtensionContext } from "vscode";
2
2
import { compareVersions } from "compare-versions" ;
3
3
import Client from "../client" ;
4
4
5
+ export const getCoqdocUrl = ( coqVersion : string ) => {
6
+ if ( compareVersions ( coqVersion , "8.18.0" ) >= 0 && compareVersions ( coqVersion , "9.0.0" ) < 0 ) {
7
+ return ( `https://coq.inria.fr/doc/V${ coqVersion } /refman/index.html` ) ;
8
+ }
9
+ return "https://coq.inria.fr/doc/master/refman/index.html"
10
+ } ;
5
11
6
12
export const checkVersion = ( client : Client , context : ExtensionContext ) => {
7
13
const extensionVersion = context . extension . packageJSON . version ;
You can’t perform that action at this time.
0 commit comments