posit-dev / positron

Positron, a next-generation data science IDE
Other
2.38k stars 70 forks source link

Frontmatter integration update for Markdown (Quarto integration) #4237

Closed mcanouil closed 2 weeks ago

mcanouil commented 1 month ago

Currently Positron uses an "old" version of the front matter specification:

The update on VSCode caused issue with the quarto VSCode extension which can be fixed by a update of the tm language file (https://github.com/quarto-dev/quarto/pull/506) but this might have some unexpected effect on Positron.

I've tested to run the development version from my Pull Request on Positron but I'm not sure the debug mode overwrite the built-in quarto extension so I am not entirely sure how it behaves on Positron. https://files.slack.com/files-pri/T02V9CHFH-F07FFNN212R/image.png


From https://github.com/quarto-dev/quarto/issues/501#issuecomment-2266190562

FrontMatter integration should be updated to match Markdowns

https://github.com/quarto-dev/quarto/blob/06678d55143a7d6de6c7f0232db0c5dcf8392ca6/apps/vscode/syntaxes/quarto.tmLanguage.yaml#L226-L231

microsoft/vscode-markdown-tm-grammar#162

https://github.com/microsoft/vscode-markdown-tm-grammar/blob/main/markdown.tmLanguage.base.yaml#L202-L216

mcanouil commented 1 month ago

FYI, it appears (at least from my tests) the issue on VSCode is on everything but macOS. Below a screen recording switching from macOS to Debian via DevContainer.

https://github.com/user-attachments/assets/87ca0be7-f03c-4e00-9aed-f1d664a25f9d

juliasilge commented 1 month ago

The only way I know to really be sure you are using the dev version of an extension is to remove the builtin one, i.e. like:

rm -r /Applications/Positron.app/Contents/Resources/app/extensions/quarto.quarto

I just tested out this change by using the .vsix generated here with the current release build of Positron and all is working well. There are no problems similar to those outlined in https://github.com/quarto-dev/quarto/issues/501#issuecomment-2266190562.

I just finished up testing on macOS and will get out my Windows machine here in a bit.

FYI we plan to merge from VS Code upstream this week.

mcanouil commented 1 month ago

Thanks for the update. I'm not sure the VSCode extension can really wait a week-ish as it's completely broken right now (it's more of a "ASAP" update).

juliasilge commented 1 month ago

Sure thing! I will sanity check on Windows and I think the Quarto extension is fine to update.

Have you checked if this new extension version works correctly with the previous VS Code version?

mcanouil commented 1 month ago

No, I did not. I needed my VSCode install to be able to do my main job.

If a user doesn't update VSCode, it can also block the extension update as well.

juliasilge commented 1 month ago

I also just tested on Windows with:

Positron Version: 2024.07.0 (system setup) build 2024.07.0-125 Code - OSS Version: 1.91.0 Commit: cae4905332a0f41a6233e196b48a6679b832000a Date: 2024-07-31T22:26:02.970Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.19045

(Note the old version of VS Code.)

Things looks fine to me:

image

mcanouil commented 1 month ago

Thanks for testing!

juliasilge commented 1 month ago

I believe this is addressed by #4261 @jmcphers, correct?

mcanouil commented 1 month ago

The Quarto extension is one thing.

There is also:

But this might be taking care of while updating Code OSS.

By updating the extension first, the issue that occurred on VSCode won't happen on Positron in theory.

juliasilge commented 1 month ago

But this might be taking care of while updating Code OSS.

Yep! That is correct.

petetronic commented 1 month ago

We have updated Quarto to 1.114, and the markdown-basics extension's tm grammar will be updated when we update from upstream Code OSS 1.92 later this month.

jonvanausdeln commented 2 weeks ago

Verified Fixed

Positron Version(s) : 2024.08.0-77 OS Version(s) : Windows 11

Test scenario(s)

Tried a few different quarto documents and everything works as expected.

Link(s) to TestRail test cases run or created: