Skip to content

Commit

Permalink
[code] Don't trigger goals buffer action in general Markdown documents
Browse files Browse the repository at this point in the history
cc: #598
  • Loading branch information
ejgallego committed Nov 26, 2023
1 parent 9a96682 commit 67b8e6c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions editor/code/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
ThemeColor,
WorkspaceConfiguration,
Disposable,
DocumentSelector,
languages
} from "vscode";

import {
Expand Down Expand Up @@ -204,14 +206,17 @@ export function activateCoqLSP(
infoPanel.updateFromServer(client, uri, version, position);
};

const coqLSPDocumentSelector : DocumentSelector = [
{ language: 'coq'},
{ language: 'markdown', pattern: '**/*.mv' }
];

const goalsCall = (
textEditor: TextEditor,
callKind: TextEditorSelectionChangeKind | undefined
) => {
if (
textEditor.document.languageId != "coq" &&
textEditor.document.languageId != "markdown"
)

if (languages.match(coqLSPDocumentSelector, textEditor.document) < 1)
return;

const kind =
Expand Down

0 comments on commit 67b8e6c

Please sign in to comment.