Skip to content

Commit 3d9e475

Browse files
committed
vim-config work in progress
1 parent 13730e7 commit 3d9e475

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

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/fixtures/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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@ setlocal errorformat^=%Z
1414
setlocal errorformat^=%-G\ \ \ \ Suggested\ fix:%.%#
1515
setlocal errorformat^=%-G\ \ \ \ \ \ Perhaps\ you\ meant\ %.%# " GHC 9.2
1616

17+
" single-line error message
18+
setlocal errorformat+=%f:%l:%c:\ %t%*[^:]:\ [GHC-%n]\ %m
19+
setlocal errorformat+=%f:%l:%c:\ %t%*[^:]:\ %m " GHC 9.6
20+
1721
" Hspec
1822
setlocal errorformat^=\ \ %f:%l:%c:\ .%#

vim/test/fixtures/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)