-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add support for org-mode files #277
Comments
Can confirm this, seems like a general problem. I am trying to check Asciidoc (identifier 'asciidoc') files with Ltex. Same as described above. Checking MD works. Settings:
|
Maybe the docs of To be able to work with org-mode files, we need an org-mode parser written in Java; the parser needs to preserve source code positions. I'll look into this. @neoscaler Please open a separate feature request for Asciidoc. |
The available options of org-mode parsers written in Java and in active development seem to be orgzly/org-java and 200ok-ch/org-parser. The former is licensed under GPLv3 and the latter under AGPLv3, both without linking exceptions (such as the Classpath exception). Unfortunately, these licenses are incompatible with the MPL-2.0 LTEX is using. I'm not sure how you can possibly license a library (it's a whole different story for standalone programs) under the GPL and not under the LGPL, as that essentially means that only GPL libraries/programs can use that library. So, until somebody comes up with a different parser we can use (and which preserves source code positions), this feature is going to be out-of-scope. Mentioning #91 as fixing that would help here as well. |
FWIW, it's possible to check arbitrary files as plain text by adding the code language ID such as |
Thanks @valentjn for the effort! |
If the result doesn't have to be 100% accurate (regarding false positives), I'll try writing a parser myself. It doesn't have to be an actual parser; it suffices to strip all the markup away. If the syntax of org-mode is reasonable (which I don't know), this might be within my reach. |
Since it is very similar to markdown, it may even be possible to adjust a md parser to make it work. For me, being able to activate the extension to quickly check text in all sorts of places is already great. |
I finished the Org parser. Now I know enough Org to be able to say that Org isn't sufficiently similar to Markdown. Reusing the Markdown parser was not an option, unfortunately. This is fixed in 10.1.0. |
Describe the bug
Ltex will not start with org files although enabled.
Steps to reproduce
vscode-org-mode
extension*.org
Expected behavior
Ltex starts and checks document
Sample document
Any org document.
LTeX configuration
The text was updated successfully, but these errors were encountered: