quarto-dev / quarto-dev/quarto
No completions on VSCode extension on Linux (problem with "trashing" virtual document files)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Description
Related:
https://github.com/quarto-dev/quarto/issues/329
https://github.com/quarto-dev/quarto/issues/190
https://github.com/quarto-dev/quarto-cli/discussions/4269
Can't get R code completions/suggestions to work inside an {r} chunk of a .qmd file.
It looks like the quarto VSCode extension creates a .intellisense.r file (sometimes a .vdoc.r?), grabs completions from there through the REditorSupport extension then serve them in the current active quarto editor, creating then trashing the file on every request.
From the discussion in quarto-cli linked above, it seems like this file should be created in a nearby directory, but mine is being created at /tmp/tmp-*-*/r/ directory, and with no write permission to that root folder, the temporary file can't be deleted.
This means that I get 1 code completion right and after that no more until it decides to create the file in another tmp directory which happens when VSCode is restarted. Here is the debug logs from Output -> Window:
2024-05-10 20:09:25.502 [debug] _performFileEdits [{"oldResource":{"$mid":1,"fsPath":"/tmp/tmp-26098-KsrUF66R9pC5/r/.intellisense.r","external":"file:///tmp/tmp-26098-KsrUF66R9pC5/r/.intellisense.r","path":"/tmp/tmp-26098-KsrUF66R9pC5/r/.intellisense.r","scheme":"file"},"options":{}}]
2024-05-10 20:09:25.517 [error] Unknown (FileSystemError): Failed to move '.intellisense.r' to the trash (Failed to move item to trash)
at $.create (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:56:3584)
at P (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:56:3698)
at b.y (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:61:40216)
2024-05-10 20:09:25.517 [warning] IGNORING workspace edit: Unknown (FileSystemError): Failed to move '.intellisense.r' to the trash (Failed to move item to trash)
Quarto extension: v1.111.0
R extension: v2.8.3
languageserver package: v0.3.16
VSCode: v1.89.1-1715060508
Linux Mint: v21.3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the VSCode extension's virtual-document and completion flow, then read the linked quarto-cli discussion 4269 and related issues 329 and 190. Reproduce on Linux with the listed extension versions and trace creation and removal of .intellisense.r or .vdoc.r under /tmp. Done means repeated R completions work without the reported trash or workspace-edit errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100