File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ Features aplenty
17
17
* Searching for definitions including sourced files using commands like ` [i ` .
18
18
* Keyword lookup that includes pages for fish builtins using the ` K ` command.
19
19
* Completions from fish using the ` ^X^O ` command.
20
+ * Syntax checking with quickfix using the ` :make ` command.
20
21
* Improved ` funced ` experience to instantly start typing commands in the
21
22
function body.
22
23
* Mimics ` funced ` when manually creating new functions.
@@ -29,6 +30,9 @@ some Vim features turned on:
29
30
syntax enable
30
31
filetype plugin indent on
31
32
33
+ " Set up :make to use fish for syntax checking.
34
+ compiler! fish
35
+
32
36
" Set this to have long lines wrap inside comments.
33
37
set textwidth=79
34
38
Original file line number Diff line number Diff line change @@ -60,3 +60,7 @@ function! fish#Complete(findstart, base)
60
60
return l: results
61
61
endif
62
62
endfunction
63
+
64
+ function ! fish#errorformat ()
65
+ return ' %Afish: %m,%-Z%f (line %l):%s'
66
+ endfunction
Original file line number Diff line number Diff line change
1
+ if exists (' current_compiler' )
2
+ finish
3
+ endif
4
+ let current_compiler = ' fish'
5
+
6
+ CompilerSet makeprg = fish\ -- no -execute\ %
7
+ execute ' CompilerSet errorformat=' .escape (fish#errorformat (), ' ' )
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ function! SyntaxCheckers_fish_fish_GetLocList()
11
11
let l: makeprg = syntastic#makeprg#build ({' exe' : ' fish' ,
12
12
\' args ' : ' -- no -execute',
13
13
\ 'subchecker': 'fish'})
14
- let l: errorformat = ' %Afish: %m,%-Z%f (line %l):%s '
15
- return SyntasticMake ({ ' makeprg ' : l: makeprg , ' errorformat' : l: errorformat })
14
+ return SyntasticMake ({ ' makeprg ' : l: makeprg ,
15
+ \ 'errorformat ': fish# errorformat() })
16
16
endfunction
17
17
18
18
call g: SyntasticRegistry .CreateAndRegisterChecker ({' filetype' : ' fish' ,
You can’t perform that action at this time.
0 commit comments