Skip to content

Commit b44f8a2

Browse files
Flycheck verify: show project information
Refs #165
1 parent fe8192b commit b44f8a2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

flycheck-fsharp.el

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,22 @@
4141
"Verify the F# syntax checker."
4242
(let* ((host (fsharp-ac--hostname (buffer-file-name)))
4343
(process (fsharp-ac-completion-process host))
44+
(project-file (when process (fsharp-ac--in-project-p (buffer-file-name))))
4445
(status (when process (process-status process)))
4546
(command (when process (combine-and-quote-strings (process-command process)))))
46-
(list
47+
(cons
4748
(flycheck-verification-result-new
4849
:label "FSharp.AutoComplete process"
4950
:message (cond
5051
((eq status 'run) command)
5152
(status (format "Invalid process status: %s (%s)" command status))
5253
("not running"))
53-
:face (if (eq status 'run) 'success '(bold error))))))
54+
:face (if (eq status 'run) 'success '(bold error)))
55+
(when (eq status 'run)
56+
(list (flycheck-verification-result-new
57+
:label "F# Project"
58+
:message (or project-file "None")
59+
:face (if project-file 'success '(bold warning))))))))
5460

5561
(defun flycheck-fsharp-fsautocomplete-lint-start (checker callback)
5662
"Start a F# syntax check with CHECKER.

0 commit comments

Comments
 (0)