Jerome St-Louis opened 1 year ago
|
|||||
Had to write a eC antlr grammar, and then parse it to get all symbols. Also works if it has a Java parser. |
|||||
Just note that you are referring to syntax highlighting. In this case, a codemirror language mode is necessary. Unfortunately eC is not in its supported language list yet: |
|||||
Thank you very much @robin . We will try to contribute support for eC in Code Mirror. eC is a superset of C, with a few extra keywords. I think we can add it to the C-Like mode. Just enabling C-style syntax highlighting for .ec and .eh files would already be a big improvement. See also:
|
|||||
As long as eC support is in CodeMirror, I will upgrade to take the chagne. As to symbol navigation which requires to parse eC source, a pure-java approach will be preferred to avoid creating multiple processes to increase memory foot print and sacrifying cross-platform nature of JVM. |
|||||
I have this patch here that enhances the C-like mode to support eC: https://github.com/jerstlouis/codemirror5/commit/9621f326027face2ec175225130e2d0811e87a60 However, they explicitly state that they don't accept Pull Requests for new modes, but instead suggest to create stand-alone npm packages for them, and point to the Elixir mode as an example. Not sure what the best way to go about it would be. |
|||||
This is great. I will add this mode separately into OneDev. |
|||||
Or you may submit a pull request here to add mode directly in OneDev: |
|||||
@robin Thanks a lot, how can I do a Pull Request on OneDev itself? Do I need to be given access? I can't push new branches. |
|||||
You may fork the repository, and then submit pull request there. Thanks for your help on this! |
|||||
https://code.onedev.io/projects/599/pulls/51 EDIT: Figured out the mapping is done in mode/meta.js Thank you very much @robin ! We are already so happy with OneDev, but eC highlighting will be the cherry on top! :) |
|||||
OneDev changed state to 'Closed' 1 year ago
|
|||||
State changed as code fixing the issue is committed |
|||||
OneDev changed state to 'Released' 1 year ago
|
|||||
State changed as build #3112 is successful |
Type |
Question
|
Priority |
Minor
|
Assignee |
How can we add support for a particular programming language?
Our codebase is in eC which is supported by Linguist and pygments, including on GitHub.
Thank you.