File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -413,3 +413,19 @@ def __display_notes(self, notes):
413
413
self ._matches .append (match )
414
414
# add_match_msg = "added match {} at line {} column {} error {}"
415
415
# self.log.debug(add_match_msg.format(match, l, c, e))
416
+ def is_note_correct (note ): # Server bug? See #200
417
+ return note ['beg' ] != - 1 and note ['end' ] != - 1
418
+
419
+ current_file = self .path ()
420
+ loclist = list ({
421
+ 'bufnr' : self ._vim .current .buffer .number ,
422
+ 'lnum' : note ['line' ],
423
+ 'col' : note ['col' ],
424
+ 'text' : note ['msg' ],
425
+ 'type' : note ['severity' ]['typehint' ][4 :5 ],
426
+ } for note in notes
427
+ if current_file == path .abspath (note ['file' ])
428
+ and is_note_correct (note )
429
+ )
430
+ self .write_quickfix_list (loclist , "Typecheck errors" )
431
+
You can’t perform that action at this time.
0 commit comments