SublimeLinter / SublimeLinter-gcc

This linter plugin for SublimeLinter provides an interface to gcc or other gcc-like (cross-)compiler.
MIT License
22 stars 5 forks source link

Linter uses C++ settings when using a non-standard C syntax #14

Closed WolfBookyr closed 5 years ago

WolfBookyr commented 5 years ago

I use a custom C syntax, but as a result the linter defaults to using g++ and its associated C++ settings. It would be nice if there was a setting to specify extra syntaxes, e.g. "c_syntaxes": [ "Custom C" ] or if it selected which settings to use based on the scope of the syntax (i.e. source.c).

jfcherng commented 5 years ago

Before this plugin is re-written in pure SL4, you could add Custom C to SL's syntax mapping.

In SublimeLinter.sublime-settings,

{
    // ...
    "syntax_map": {
        "custom c": "c",
    },
    // ...
}
WolfBookyr commented 5 years ago

I tried that, but it had no effect. Having seen your example I realised that my mistake was that I didn't use all lower case. I tried it again with all lower case and it works great.

Thank you!