-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
[Enhancement] Error suppression support. #1254
Comments
It does not make much sense to suppress syntax errors, because most of the time this will cause other syntax to produce other errors. The best way is to use plugin |
I don't understand the sentiment. In the case of compound operators, the two aforementioned errors could be specifically disabled and the extension would be 100% compatible with the rest of the file, especially regarding Intellisense. With non-standard operator support, you already implement this half-way. However, it's hard-coded and supports a limited set of non-standard operators. Plugins support custom doc syntax, but they don't appear to support actual new syntax in the Lua language, like new operators or keywords. In particular, each syntax error doesn't need to be the duty of the extension to manage. Lua can report these fine, but you can implement best of both worlds by allowing a toggle. |
I am not sure what you mean precisely with semantic, but the largest Intellisense error is missing
This would silence all of the errors associated with the expression. The addition of one more diagnostic:
Would silence issues with new keyword expressions too. Alternatively, a powerful toggle to completely disable syntax checking for the current file or workspace would allow any sort of foreign Lua syntax, but still provide Intellisense where possible. This may likely be optimal, since some crazy forks exist and will require tedious tweaking that can otherwise be avoided. To a lesser extent, this may provide some more performance to much larger codebases that simply don't need syntax checking. |
Let's divide the discussion into two questions Q: Why not provide the feature of suppressing syntax errors? Q: Can add core support for this dialect? |
Is this not just the cascading issue mentioned above? Sorry if I'm misunderstanding, but there could even be a full denial of analysis (or in this case, semantic analysis?) when necessary, so any syntax highlighting or standard library Intellisense can be applied. No need to specialize core support for dialect by dialect. This extension also makes third-party Intellisense fairly easy to type, which is another loss. If, in theory of course, something like this were to be introduced as a strong suppression for errors and warnings resulting from errors, then any user confusion is the fault of the user. "Don't disable diagnostic if you want warnings" type thing, because it can be applied in appropriate scenarios. If we can already fully disable warnings, why shouldn't we be able to fully disable static syntax checks? These are not things the extension must handle, they can be configurable. That is, unless I've missed something critical? Is Lua-Check tied to all the other features of this extension? If so, I can see why it cannot be disabled. However, if it's not, then this seems as trivial as disabling warnings was. |
A project of mine named Pluto adds some new syntax into Lua. It's largely compatible, but symbols such as compound operators, new keywords, and expression syntaxes throw insuppressible errors that make the extension incompatible with any mild fork of Lua.
It's evident this excellent extension involves some interest in foreign Lua syntax, see non-standard symbol support. As such, I feel it'd be beneficial if this extension received error suppression equitable to diagnostic warning suppression.
This syntax would greatly enhance the extension's compatibility with syntactic expansions and increase the coverage of this extension.
The text was updated successfully, but these errors were encountered: