Skip to content

Commit 69585d4

Browse files
Flycheck: Add predicate function
Prevents calling checker when FSharp.AutoComplete process is not ready to handle requests. Refs #167
1 parent 1309c29 commit 69585d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flycheck-fsharp.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ CALLBACK is the status callback passed by Flycheck."
4848
"A syntax checker for F# using FSharp.AutoComplete.
4949
See URL `https://github.com/fsharp/FsAutoComplete'."
5050
:start #'flycheck-fsharp-fsautocomplete-lint-start
51+
:predicate (lambda () (fsharp-ac-can-make-request t))
5152
:modes '(fsharp-mode))
5253

5354
(defvar flycheck-fsharp--error-callback-info nil)
@@ -63,6 +64,7 @@ CALLBACK is the status callback passed by Flycheck."
6364
See URL `https://github.com/fsharp/FsAutoComplete'."
6465
:start #'flycheck-fsharp-fsautocomplete-start
6566
:modes '(fsharp-mode)
67+
:predicate (lambda () (fsharp-ac-can-make-request t))
6668
:next-checkers '((info . fsharp-fsautocomplete-lint)))
6769

6870
(defun flycheck-fsharp-handle-lint (data)

0 commit comments

Comments
 (0)