Skip to content

Commit

Permalink
Add `eglot-fsharp-server-args' for additional arguments
Browse files Browse the repository at this point in the history
Make ("--adaptive-lsp-server-enabled") the default args because the
server crashes on boot without the adaptive flag.

Remove `eglot-fsharp-server-verbose'.
  • Loading branch information
juergenhoetzel committed Oct 27, 2022
1 parent cb5a342 commit f887309
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions eglot-fsharp.el
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
(const :tag "Latest release" latest)
(string :tag "Version string")))

(defcustom eglot-fsharp-server-verbose nil
"If non-nil include debug output in the server logs."
:type 'boolean)
(defcustom eglot-fsharp-server-args '("--adaptive-lsp-server-enabled")
"Arguments for the fsautocomplete command when using `eglot-fsharp'."
:type '(repeat string))

(defun eglot-fsharp--path-to-server ()
"Return FsAutoComplete path."
Expand Down Expand Up @@ -125,11 +125,7 @@ Ensure FsAutoComplete is installed (when called INTERACTIVE)."
(when interactive (eglot-fsharp--maybe-install))
(when (file-exists-p (eglot-fsharp--path-to-server))
(cons 'eglot-fsautocomplete (cons (eglot-fsharp--path-to-server)
(if eglot-fsharp-server-verbose
`("--verbose" "--adaptive-lsp-server-enabled")
`("--adaptive-lsp-server-enabled"))))))


eglot-fsharp-server-args))))


(defclass eglot-fsautocomplete (eglot-lsp-server) ()
Expand Down

0 comments on commit f887309

Please sign in to comment.