stackblitz / tutorialkit

TutorialKit by StackBlitz - Create interactive tutorials powered by the WebContainer API
https://tutorialkit.dev
MIT License
232 stars 22 forks source link

TutorialKit extension's intellisense kicks off in non-tutorialkit projects #237

Closed sulco closed 1 month ago

sulco commented 1 month ago

Describe the bug

When TutorialKit extension is active, it seems to work on all files with frontmatter, even if it's not a tutorialkit project (e.g. an Astro blog), leading to false warnings and autocompletions:

image

Link to a StackBlitz project which shows the error

No response

Steps to reproduce

  1. Create a new folder, with a markdown file inside
  2. Open the folder in vscode with the tutorialkit extension active
  3. Add some frontmatter into the markdown file
    ---
    slug: 1
    ---
    Hello
  4. See tutorialkit-relevant warnings image

Expected behavior

The warnings and completions should not appear in the non-tutorialkit projects.

Screenshots

No response

Platform

Additional context

Looks like the isTutorialKitWorkspace (in extensions/vscode/src/utils/isTutorialKit.ts) function might be handy here:)