Skip to content

Commit d35d2c9

Browse files
committed
Turn off visual mode completions in Positron
1 parent 355803f commit d35d2c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/vscode/src/providers/editor/codeview.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import {
4545
kCodeViewGetCompletions,
4646
} from "editor-types";
4747

48+
import { hasHooks } from "../../host/hooks";
4849
import { embeddedLanguage } from "../../vdoc/languages";
4950
import { virtualDocForCode } from "../../vdoc/vdoc";
5051
import { vdocCompletions } from "../../vdoc/vdoc-completion";
@@ -83,7 +84,11 @@ export function vscodeCodeViewServer(_engine: MarkdownEngine, document: TextDocu
8384

8485
// see if we have an embedded langaage
8586
const language = embeddedLanguage(context.language);
86-
if (language) {
87+
88+
// is this in Positron? If so, no completions
89+
// TODO: fix LSP issues for visual editor in Positron:
90+
// https://github.com/posit-dev/positron/issues/1805
91+
if (language && !hasHooks()) {
8792

8893
// if this is a yaml comment line then call the lsp
8994
const line = context.code[context.selection.start.line];

0 commit comments

Comments
 (0)