Skip to content

Commit 385c67d

Browse files
Flycheck verify: display loaded projects
Fixes #165 Refs #166
1 parent b44f8a2 commit 385c67d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

flycheck-fsharp.el

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
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))))
4544
(status (when process (process-status process)))
45+
(project-file (when (eq status 'run) (fsharp-ac--in-project-p (buffer-file-name))))
46+
(projects (when (eq status 'run) (hash-table-keys fsharp-ac--project-data)))
4647
(command (when process (combine-and-quote-strings (process-command process)))))
4748
(cons
4849
(flycheck-verification-result-new
@@ -56,7 +57,13 @@
5657
(list (flycheck-verification-result-new
5758
:label "F# Project"
5859
:message (or project-file "None")
59-
:face (if project-file 'success '(bold warning))))))))
60+
:face (if project-file 'success '(bold warning)))
61+
(flycheck-verification-result-new
62+
:label "Loaded Projects"
63+
:message (if projects
64+
(mapconcat #'identity projects ", ")
65+
"No projects loaded")
66+
:face (if projects 'success '(bold warning))))))))
6067

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

0 commit comments

Comments
 (0)