Skip to content

Commit ad93522

Browse files
use quickfix window
1 parent 8387c47 commit ad93522

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ensime_shared/editor.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,3 +413,19 @@ def __display_notes(self, notes):
413413
self._matches.append(match)
414414
# add_match_msg = "added match {} at line {} column {} error {}"
415415
# 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+

0 commit comments

Comments
 (0)