Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.122.0 (unreleased)

- Change controls on Positron editor action bar and fix "Render on Save" behavior (<https://github.com/quarto-dev/quarto/pull/706>).
- Turn off completions in visual mode in Positron, as a temporary stopgap until we can invest more in LSP features in the visual editor (<https://github.com/quarto-dev/quarto/pull/710>).

## 1.121.0 (Release on 2025-05-02)

Expand Down
17 changes: 11 additions & 6 deletions apps/vscode/src/providers/editor/codeview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
kCodeViewGetCompletions,
} from "editor-types";

import { hasHooks } from "../../host/hooks";
import { embeddedLanguage } from "../../vdoc/languages";
import { virtualDocForCode } from "../../vdoc/vdoc";
import { vdocCompletions } from "../../vdoc/vdoc-completion";
Expand Down Expand Up @@ -83,6 +84,7 @@ export function vscodeCodeViewServer(_engine: MarkdownEngine, document: TextDocu

// see if we have an embedded langaage
const language = embeddedLanguage(context.language);

if (language) {

// if this is a yaml comment line then call the lsp
Expand All @@ -91,7 +93,11 @@ export function vscodeCodeViewServer(_engine: MarkdownEngine, document: TextDocu
return lspCellYamlOptionsCompletions(context, lspRequest);

// otherwise delegate to vscode completion system
} else {
// is this in Positron? If so, no completions
// TODO: fix LSP issues for visual editor in Positron:
// https://github.com/posit-dev/positron/issues/1805
}
if (!hasHooks()) {
const vdoc = virtualDocForCode(context.code, language);
const completions = await vdocCompletions(
vdoc,
Expand All @@ -108,12 +114,11 @@ export function vscodeCodeViewServer(_engine: MarkdownEngine, document: TextDocu
isIncomplete: false
};
}
} else {
return {
items: [],
isIncomplete: false
};
}
return {
items: [],
isIncomplete: false
};
}
},
async codeViewPreviewDiagram(state: DiagramState, activate: boolean) {
Expand Down