Skip to content

No completions on VSCode extension on Linux (problem with "trashing" virtual document files) #437

@PauloCampana

Description

@PauloCampana

Related:
#329
#190
quarto-dev/quarto-cli#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions