Skip to content

Commit 13808a6

Browse files
committed
wip
1 parent e3b1e48 commit 13808a6

4 files changed

Lines changed: 32 additions & 8 deletions

File tree

solid.errors

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
src/Command.hs:200:22: error:
2+
error: [GHC-21231]
3+
lexical error in string/character literal at character 'c'
4+
5+
src/Command.hs:1:1: error:
6+
`solid-pp' failed in phase `Haskell pre-processor'. (Exit code: 1)

vim/sensei.test.vim

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,16 @@ call ShouldBe(err.end_col, 0)
163163
call ShouldBe(err.type, '')
164164
call ShouldBe(err.nr, -1)
165165
call ShouldBe(err.text, "")
166+
167+
let errors = PopulateQuickFixList("vim/test/assets/one-line.errors")
168+
call ShouldBe(len(errors), 1)
169+
170+
let err = errors[0]
171+
call ShouldBe(bufname(err.bufnr), "src/Editor/Vim.hs")
172+
call ShouldBe(err.lnum, 30)
173+
call ShouldBe(err.col, 3)
174+
call ShouldBe(err.end_lnum, 0)
175+
call ShouldBe(err.end_col, 0)
176+
call ShouldBe(err.type, 'e')
177+
call ShouldBe(err.nr, 76037)
178+
call ShouldBe(err.text, "Not in scope: ‘cexpr’")

vim/sensei.vim

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
setlocal makeprg=seito
1+
set makeprg=seito
22

33
" GHC
4-
setlocal errorformat=%A%f:%l:%c:\ %t%*[^:]:\ [GHC-%n]
5-
setlocal errorformat^=%A%f:%l:%c:\ %t%*[^:]: " GHC 9.6
4+
set errorformat=%A%f:%l:%c:\ %t%*[^:]:\ [GHC-%n]
5+
set errorformat^=%A%f:%l:%c:\ %t%*[^:]: " GHC 9.6
66

77
" lines that start with a space continue the previous message
8-
setlocal errorformat^=%+C\ %.%#
8+
set errorformat^=%+C\ %.%#
99

1010
" empty lines terminate a message
11-
setlocal errorformat^=%Z
11+
set errorformat^=%Z
1212

1313
" ignore this part of the message
14-
setlocal errorformat^=%-G\ \ \ \ Suggested\ fix:%.%#
15-
setlocal errorformat^=%-G\ \ \ \ \ \ Perhaps\ you\ meant\ %.%# " GHC 9.2
14+
set errorformat^=%-G\ \ \ \ Suggested\ fix:%.%#
15+
set errorformat^=%-G\ \ \ \ \ \ Perhaps\ you\ meant\ %.%# " GHC 9.2
16+
17+
" single-line error message
18+
set errorformat+=%f:%l:%c:\ %t%*[^:]:\ [GHC-%n]\ %m
19+
set errorformat+=%f:%l:%c:\ %t%*[^:]:\ %m " GHC 9.6
1620

1721
" Hspec
18-
setlocal errorformat^=\ \ %f:%l:%c:\ .%#
22+
set errorformat^=\ \ %f:%l:%c:\ .%#

vim/test/assets/one-line.errors

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)