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

Not Working with Madoko Document Type #85

Closed
kvn-s opened this issue Oct 23, 2017 · 8 comments
Closed

Not Working with Madoko Document Type #85

kvn-s opened this issue Oct 23, 2017 · 8 comments

Comments

@kvn-s
Copy link

kvn-s commented Oct 23, 2017

I'm using the Madoko for VSCode extension and having trouble getting the spell checker to work.

It's actually working fine with Markdown and other formats. Just Madoko seems to make trouble. I already tried enabling it by default for the document type using "spellright.documentTypes": ["madoko", "markdown", "latex", "plaintext"] and the status bar info suggests it's activated. However absolutely no error is shown for obviously wrong words.

Any ideas on what might be wrong?

@bartosz-antosik
Copy link
Owner

bartosz-antosik commented Oct 23, 2017

Unknown document types cannot be enabled without adjusting the code. This is VSCode's limitation.

I will do this as soon as possible.

@kvn-s
Copy link
Author

kvn-s commented Oct 23, 2017

Thanks for your reply. I'm not sure if I'm understanding you correctly but the extension actually adds a new document type, no?!

See this excerpt (from here):

"contributes": {
    "languages": [
        {
            "id": "madoko",
            "aliases": [
                "Madoko",
                "madoko"
            ],
            "extensions": [
                ".mdk",
                ".madoko"
            ],
            "configuration": "./language-configuration.json"
        }
    ],
    "grammars": [
        {
            "language": "madoko",
            "scopeName": "source.madoko",
            "path": "./syntaxes/madoko.tmLanguage"
        }
    ]
}

@bartosz-antosik
Copy link
Owner

bartosz-antosik commented Oct 23, 2017

If I understand things correctly the extension for Madoko you pointed out adds new document class madoko. My extension would create an null parser for such a class whereas it should create a markdown parser. So I have to do small change in my extension to incorporate new type.

The problem with VSCode is that so far it does not give access to all the registered (by the editor itself and by the extensions) document classes. It would be great if VSCode would give access e.g. to semantical inforamtion like how are line/block comments constructed etc.

@kvn-s
Copy link
Author

kvn-s commented Oct 23, 2017

Okay, I think I know what you mean. :)

@bartosz-antosik
Copy link
Owner

Added in just released version 2.0.0. Please give some feedback if it works for you.

@kvn-s
Copy link
Author

kvn-s commented Nov 2, 2017

Thanks, it's working now. Though some Madoko specific syntax is checked too.

Would it be possible to use the Madoko syntax support instead of Markdown (if installed)?

@bartosz-antosik
Copy link
Owner

As I have noted above first part of the problem is that VSCode does not allow extensions to use the information about document class (e.g. line/block comments, strings, quoting etc.) So there is no way to parametrize my parsers to an unknown language.

Can you show me a sample (both screenshot & source of the document) demonstrating the problem?

@kvn-s
Copy link
Author

kvn-s commented Nov 13, 2017

Sorry for the late reply.

Of course, here is an example (source Test.mdk.txt):
issue with madoko

It would be great if all the errors would go away. Ideally only headlines and text blocks (excluding special inline blocks such as references) would be checked.

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

No branches or pull requests

2 participants