From 8fb6f909c34af16dc3e9d0d5b83e21abeb76f90d Mon Sep 17 00:00:00 2001 From: Ross Donaldson Date: Thu, 17 Oct 2019 21:11:46 -0700 Subject: [PATCH 1/2] A handy utility for updating fsac --- lsp-fsharp.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lsp-fsharp.el b/lsp-fsharp.el index f61ae2fb24..4e84191b0b 100644 --- a/lsp-fsharp.el +++ b/lsp-fsharp.el @@ -200,6 +200,13 @@ disable if `--backgorund-service-enabled' is not used" (shell-command unzip-script) (shell-command (format "%s %s --version" (lsp-fsharp--fsac-runtime-cmd) (lsp-fsharp--fsac-cmd))))) +(defun lsp-fsharp-update-fsac () + "Update fsautocomplete to the latest version." + (interactive) + (-let [install-dir (f-expand lsp-fsharp-server-install-dir)] + (f-delete install-dir t) + (lsp-fsharp--fsac-install))) + (defun lsp-fsharp--make-launch-cmd () "Build the command required to launch fsautocomplete." (append (list (lsp-fsharp--fsac-runtime-cmd) (lsp-fsharp--fsac-locate) "--mode" "lsp" "--background-service-enabled") From a0df5de7b98b12a2f8948c066715b1ae2541ff33 Mon Sep 17 00:00:00 2001 From: Ross Donaldson Date: Fri, 18 Oct 2019 07:18:25 -0700 Subject: [PATCH 2/2] Autoload this! It's nice to be able to update before you start the server in question. --- lsp-fsharp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lsp-fsharp.el b/lsp-fsharp.el index 4e84191b0b..6b232e9f0c 100644 --- a/lsp-fsharp.el +++ b/lsp-fsharp.el @@ -25,7 +25,6 @@ ;;; Code: (require 'lsp-mode) -(require 'pcase) (defgroup lsp-fsharp nil "LSP support for the F# Programming Language, using the FsharpAutoComplete server." @@ -223,6 +222,8 @@ disable if `--backgorund-service-enabled' is not used" (directory (car (seq-filter (lambda (d) (equal "directory" (cdr (assq 'Type d)))) found)))) (cdr (assq 'Fsprojs (cdr (assq 'Data directory)))))) + +;;;###autoload (defun lsp-fsharp--workspace-load (projects) "Load all of the provided PROJECTS." (lsp-request-async "fsharp/workspaceLoad"