positron icon indicating copy to clipboard operation
positron copied to clipboard

Language features (R and Python) do not work in Quarto visual editor

Open juliasilge opened this issue 2 years ago • 2 comments

Related to #1645 Related to #1572

As of build 1144, something like the R language support (code completions, hover help, etc) work when you edit a Quarto in source mode. However, when you try to edit the document in visual mode, the language support features are not working:

https://github.com/posit-dev/positron/assets/12505835/f71192ff-23fd-4305-9ebc-b634337daa19

Also notice you can't use tab to accept a completion that is offered:

https://github.com/posit-dev/positron/assets/10009758/a490084c-7b93-4e82-b023-95ff63b83f82

I observe this class of problems for both Python and R chunks in visual mode.

juliasilge avatar Nov 09 '23 21:11 juliasilge

A potentially related issue (which I raised but then closed on the quarto github to prevent sprawl), the tab key works differently in visual mode (indents entire line) vs the editor (for example if your between quotes behind say file = it’ll suggest paths to local files.)

MichelNivard avatar Jul 02 '24 18:07 MichelNivard

I am realizing there is a lot that doesn't work in visual mode because of how it is a whole separate editor. As another example as pointed out in https://github.com/posit-dev/positron/issues/1955#issuecomment-2291857988, if you opt in to the RStudio Keymap, you cannot use the keyboard shortcuts for |> and <-. The only "when" condition we have on those is editorLangId == quarto:

https://github.com/posit-dev/positron/blob/f65dd169323c396bda5e14ccbb6e9e80983b057e/extensions/positron-rstudio-keymap/package.json#L169

juliasilge avatar Aug 16 '24 15:08 juliasilge

We do provide completions in visual mode but they are a MESS.

juliasilge avatar Nov 22 '24 18:11 juliasilge

@juliasilge extensions suffer hard when providing their own completions + their own document model because the completion item filtering that vs code does is internal to vs code, and is not exposed to the completion hook that extensions get access to 😢

I think it does not affect source mode because it is backed by a typical TextDocument, and thus gets access to the internal filtering code

DavisVaughan avatar Nov 22 '24 19:11 DavisVaughan