Skip to content

Commit

Permalink
Merge pull request #720 from ejgallego/be_more_conservative_for_viewR…
Browse files Browse the repository at this point in the history
…ange

[code] Don't send coq/viewRange when we are in continuous mode.
  • Loading branch information
ejgallego authored May 17, 2024
2 parents 2977eda + 4d435dd commit 0840d03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/code/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ function toVsCodePerf(
}

let config: CoqLspClientConfig;
let serverConfig: CoqLspServerConfig;

let client: BaseLanguageClient;

// Lifetime of the info panel == extension lifetime.
Expand Down Expand Up @@ -120,6 +122,8 @@ export function activateCoqLSP(
client.sendNotification(type, params);
}

// Store setting on the server for local use
serverConfig = settings;
return settings;
}

Expand Down Expand Up @@ -326,6 +330,7 @@ export function activateCoqLSP(
throttle(400, (evt: TextEditorVisibleRangesChangeEvent) => {
if (
config.check_on_scroll &&
serverConfig.check_only_on_request &&
languages.match(CoqSelector.local, evt.textEditor.document) > 0 &&
evt.visibleRanges[0]
) {
Expand Down

0 comments on commit 0840d03

Please sign in to comment.