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

Some common programming languages don't show up for autocompletion, others don't work at all #862

Open
kindfulkirby opened this issue Jun 24, 2018 · 3 comments
Labels
enhancement Wants to improvide an existing feature help wanted We want you to help us with this!

Comments

@kindfulkirby
Copy link

For example Java doesn't show up for autocompletion, and C or C++ don't seem to work at all.
Personally, I'd also love to see Haxe, which highlight.js does support.

Would it be possible for people hosting their own hackmd instances to download or link their own highlight.js packages?

@kindfulkirby kindfulkirby changed the title Some common programming languages don't shop up for autocompletion, others don't work at all Some common programming languages don't show up for autocompletion, others don't work at all Jun 24, 2018
@jackycute
Copy link
Member

Hi Tobi, for sure you could custom or add more syntax highlighting supports.

The parser code is here: https://github.com/hackmdio/hackmd/blob/master/public/js/extra.js#L505
And the textcomplete list: https://github.com/hackmdio/hackmd/blob/master/public/js/index.js#L95

@kindfulkirby
Copy link
Author

kindfulkirby commented Jun 24, 2018

I wish I had any idea what all this means, I'm really no web dev ☹️

I was hoping there might be a place where I can plonk down my own highlight.js package, but I understand it's not that easy 😉

@SISheogorath SISheogorath added enhancement Wants to improvide an existing feature help wanted We want you to help us with this! labels Jun 26, 2018
@SISheogorath
Copy link
Contributor

As we just discovered in #1004 (comment) all hightlight.js languages are available when using useCDN: false.

Currently wonder how we want to handle that. I agree that it's annoying to have some languages with highlights than the one that autocomplete. (Which should be basically fixed by the mentioned commit). But we still have some things highlighted even when they are not supported.

I currently consider to remove all highlighting from unsupported languages. @ccoenen wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Wants to improvide an existing feature help wanted We want you to help us with this!
Projects
None yet
Development

No branches or pull requests

3 participants