Coder Social home page Coder Social logo

Comments (12)

rbolsius avatar rbolsius commented on July 22, 2024 1

Yeah, that sounds good to me also since it will just look for README.md in the root folder. I tried it with my large project and workspaceContains:README.md performs well unlike the previous *.md event.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

Thanks for your feedback. It is a known issue if you only open a single Markdown file.

It is a critical bug and I will resolve it soon.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

Please try v0.7.6

from vscode-markdown.

gpresland avatar gpresland commented on July 22, 2024

Please try v0.7.6

Same issue; VS Code handles md files as if the extension wasn't installed.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

That's really strange πŸ€”.

Could you please describe how you open a md file? For example, do you

  • With no vscode instance running, right click md file and select "open with vscode"? Or
  • Use "open file" with existing vscode instance?

If possible, can you upload your md file (or a sample file for test).

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

Okay, finally I decide to go back to legacy activation events. There should be no problem now.

from vscode-markdown.

rbolsius avatar rbolsius commented on July 22, 2024

I was also going to suggest just switching to a simple "onLanguage:markdown" activation event. It seems like this is the best event to use to activate the extension since it doesn't perform any expensive file scans over the project and it is possible to enable the extension even when creating a new markdown file that has not been saved yet. Another benefit is that the extension will be activated regardless what extension the user chooses for the markdown files.

It seems like the "onLanguage:markdown" event may be the only event that is needed. I'm not sure if the "workspaceContains:README.md" event is necessary since the "onLanguage:markdown" event should occur whenever the README.md file (or any other markdown file) is opened.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

@rbolsius Thanks a lot for your suggestions! You are really nice ❀

... just switching to a simple "onLanguage:markdown" activation event ... it is possible to enable the extension even when creating a new markdown file that has not been saved yet.

Yes. Totally agree. And that's why I finally gave up writing my own activation events πŸ˜….

I'm not sure if the"workspaceContains:README.md"event is necessary

From the perspective of usage, I think it's not necessary.
But there is a (slightly?) noticeable delay when user open a Markdown file for the first time.
I use README.md because I would like to provide the best experience.
And adding an additional README.md won't hurt the performance because it only scans the depth 1 (but *.md will #12). So I think README.md is the icing on the cake. What is your opinion?

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

@gpresland Hope you like this solution.

from vscode-markdown.

gpresland avatar gpresland commented on July 22, 2024

Appears to be working now πŸ‘

from vscode-markdown.

JackHowa avatar JackHowa commented on July 22, 2024

This seems to be a problem for me. I'm not using README.md. Looking for the onLanguage:markdown activation setting.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on July 22, 2024

@JackHowa onLanguage:markdown is already one of the activation events. See https://github.com/neilsustc/vscode-markdown/blob/master/package.json#L26-L29

So there might be some other reasons if you find it not working. Could you please navigate to "menubar>help>toggle developer tools" and see whether there are something related.

from vscode-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.