Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chance of MD support #2

Open
tshort opened this issue Jun 7, 2019 · 4 comments
Open

Chance of MD support #2

tshort opened this issue Jun 7, 2019 · 4 comments

Comments

@tshort
Copy link

tshort commented Jun 7, 2019

These VSCode/Julia extensions are awesome! Any chance of doing one for Markdown?

md"""
# heading

Some *italic* text
"""

If not, I'll probably copy one of your repos and make one someday.

I don't know much about vscode extensions. Is there any chance one can (somewhat easily) add a bunch of these in one extension and then have them selectable as options?

@haberdashPI
Copy link
Owner

haberdashPI commented Jun 10, 2019

Thank you!

I don't have any immediate plans for markdown. If you end up doing one for Markdown, let me know!

I'm pretty sure it would be easy to combine the plugins, enabling/disabling them with some options, but I don't know for certain. I think that would make sense to do when these are a little more battle tested. If you do make a Markdown extension, perhaps we can combine our efforts to make a comprehensive extension, once it seems like they are all working well.

Note that each language has it's own little hiccups (though I can't imagine Markdown would be difficult), because of how the two syntax files (e.g. Python and Julia) interact. For example, I had some difficulty getting the python plugin to work because """ was being treated as the start of a python docstring, instead of the end of a py""" code snippet. I suspect that ultimately tree-sitter support will make that a lot easier to handle.

@tshort
Copy link
Author

tshort commented Jun 10, 2019

Thanks, @haberdashPI. I started looking into it a bit more. It looks like julia-vscode gets its grammar file from atom-language-julia. How often is that updated?

Recently, it looks like Atom added support for py""", R""", and js""". See here.

So, I'm thinking that maybe I should add md""" to atom-language-julia first, and then make a PR to get it into vscode-julia (possibly along with the rest of the Atom updates). Does that make sense?

@tshort
Copy link
Author

tshort commented Jun 10, 2019

Also, the tree-sitter stuff is quite cool.

@haberdashPI
Copy link
Owner

haberdashPI commented Jun 10, 2019

I made some PR's to atom's syntax file a while back to make these plugins possible. They ensure the regex's I specify in the plugin resolve properly. So it shouldn't be necessary to add anything to atom's syntax file.

The support for highlighting within the atom syntax file is essentially a replacement for what I did in the plugin, with the caveat that those syntax definitions do not tell VS Code how to handle bracket closing and commenting within the embedded language. (So the colors will make sense, but, e.g. commands to comment will not work properly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants