File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ struct Args {
14
14
#[ arg( long, default_value_t = false ) ]
15
15
no_lint : bool ,
16
16
17
- /// Silence all but error messages
17
+ /// Normally warning and error messages are sent to window/showMessage
18
+ /// This will silence all window/showMessage and only use window/logMessage
18
19
#[ arg( long, default_value_t = false ) ]
19
20
silent : bool ,
20
21
}
Original file line number Diff line number Diff line change @@ -402,14 +402,12 @@ struct MessageFilter {
402
402
403
403
impl MessageHandler for MessageFilter {
404
404
fn push ( & mut self , msg : Message ) {
405
- if self . silent && msg. message_type != vhdl_lang:: MessageType :: Error {
406
- return ;
407
- }
408
-
409
- if matches ! (
410
- msg. message_type,
411
- vhdl_lang:: MessageType :: Warning | vhdl_lang:: MessageType :: Error
412
- ) {
405
+ if !self . silent
406
+ && matches ! (
407
+ msg. message_type,
408
+ vhdl_lang:: MessageType :: Warning | vhdl_lang:: MessageType :: Error
409
+ )
410
+ {
413
411
self . rpc . send_notification (
414
412
"window/showMessage" ,
415
413
ShowMessageParams {
You can’t perform that action at this time.
0 commit comments