-
Notifications
You must be signed in to change notification settings - Fork 37
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
Consider supporting unknown file types #104
Comments
Hi! Thanks for the interest & input to the extension! The problem of unsupported file types has bothered me for some time. There is an item on my TODO list: Configure parsers for unknown document types. So I was imagining that once unknown document type is encountered Spell Right should propose one of the generic parsers (plain text, strings/comments speller for programming language type of documents, LaTeX, XML or Markdown type of documents) and make it persistent setting in user/workspace configuration. Thing is not very straightforward as the record describing parser for the type should handle parsers parameters as well. Plus all the existing settings, like regular expressions, should work with such a setup. I have neither timing nor any clear plan for the change but it was supposed to be the very next job around the component. So please let me think about it. Would the solution outlined above be interesting for you to work on? |
You made a very valid point about some languages not working well since this also needs to be applied to other programming languages that you have not made a parser for yet. I think the current default is sensible for prompting users to create an issue or contribute for additional programming languages to be supported. However, if a user adds a document type and acknowledges the prompt, they should get the standard plain text parser for that type without any additional prompts. I think that might be a happy medium between the two solutions. Asking a user which parser they want (through the config) would be a little bit confusing. I don't think anyone would know the differences on how you parse XML verses LaTeX. End of the day, programming languages really should have a custom parser. What do you think about that solution? Also, yeah, I'll absolutely throw in the time to get this done. Shouldn't be too time consuming! |
I have finished changes for basic support of unknown file types - once you select language for unknown document type Spell Right offers a selection of parsers & updates configuration accordingly. Would you please consider testing it: https://drive.google.com/open?id=1zj6YEenKtKqAyXBfaSfLSKcvXCiNKLw4 Shall you have any remarks, please let me know! |
@bartosz-antosik I just tested this against an "rst" (reStructuredText) file and it worked like a charm. Thank you! |
@mdudzinski You are welcome! That's strange however, because I see that |
@bartosz-antosik this one. Spellright 2.0.18 (the latest on the marketplace) wasn't recognizing "rst" files. |
@mdudzinski I see! I will connect |
It is resolved in version 2.1.0. See |
Sorry for the delayed reply on this one, I just tried out the new version. Great work on this, thanks so much! |
There are a few generic syntaxes I use for note keeping, .ol (outline) and .note to name two. Unfortunately, I cannot use this plugin for these unsupported syntaxes. Would you be open to a PR that passes all unknown languages to act as normal plain text? Or if you are worried about some languages falling through the cracks and actually needing support, maybe have an explicit config for plaintext syntaxes.
I'm more than happy to put in the work on this one, I just wanted to gauge your interest on it before I put in the time. I currently have it working locally, but I just added some additional cases for myself.
With that being said, thanks for taking the time to create this plugin, solid work.
The text was updated successfully, but these errors were encountered: