Is there a way to disable diagnostics for a specific case? #2273
-
Is there a way to disable diagnostics for lines that begin with a specific letter or string? The software I am using recognizes lines in a Lua file that begin with a specified character as a split point in the file. This allows multiple short files to be combined into one. These lines do not actually affect the execution of the code, but they are displayed as error diagnostics in the editor. So we would like to disable the error display if possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
You might be able to use |
Beta Was this translation helpful? Give feedback.
-
@carsakiller where can i read more about |
Beta Was this translation helpful? Give feedback.
I can't think of a way to make it work, either. If you are able to modify the tool that is splitting files, it would probably be best if the symbol were in a comment to prevent syntax error warnings.
You should be able to list multiple diagnostics to disable:
---@diagnostic disable-next-line: param-type-mismatch, redundant-parameter