swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
132 stars 21 forks source link

Support for MyST #312

Closed alcarney closed 2 months ago

alcarney commented 2 years ago

MyST is a flavour of markdown that is compatible with Sphinx. It should be possible to add just by calling out to the existing directive/roles logic where applicable

haiyangToAI commented 2 years ago

Hi @alcarney,

I like the idea of Esbonio to support Sphinx directives and roles for MyST/Markdown files. It will be helpful.

Directives and roles in MyST/Markdown look like this, see MyST Docs:

To support directives and roles for MyST/Markdown, Esbonio need to:

What do you think this approach? @alcarney @danwos

By adding a new trigger {, then Esbonio can already support roles and directives that using short-hand options and eval-rst. If you think this is the way, then I will prepare a PR.

alcarney commented 2 years ago

Overall it makes sense, though I did do a very basic proof of concept for roles a while ago and so have some thoughts on how I think the implementation should look :)

Of course, it would take quite a while to line all that up and probably only the first point is necessary to get something shipped so happy to go and forth on this a bit.

Let me know your thoughts :smile:

davbeek commented 2 years ago

I am completely new to MyST, had a look at some online documentation and must say that it looks very promising. I would like to try and switch to MyST, when supported by esbonio.

astrojuanlu commented 12 months ago

Yes please 🙏🏽 I've been using MyST for 2 years and I'm not looking back (disclaimer: I wrote the Sphinx tutorial https://www.sphinx-doc.org/en/master/tutorial/ and worked at Read the Docs for 1 year)

alcarney commented 12 months ago

It's definitely on the list for the 1.0 release :)

alcarney commented 7 months ago

There is now a hint of MyST support in the current pre-release of the language server v1.0.0b1

To quote myself from another thread

The beginnings of MyST support!

  • Assuming you have the relevant dependencies installed, builds and previews of MyST source files should mostly "Just Work"TM
  • Document symbols, workspace symbols and diagnostics should also mostly work
  • Limited support for completions of directives (::: syntax and nested directives not currently supported)
chrisjsewell commented 5 months ago

FYI you might want to consider adding https://github.com/chrisjsewell/vscode-myst-syntax in the extensionDependencies

alcarney commented 5 months ago

Thanks, that looks useful! :)

alcarney commented 2 months ago

Closing in favour of smaller, focused issues. The current pre-release has MyST support for all currently implemented features