Skip to content

Commit 5298775

Browse files
authored
Correct global tool commands for fsharpautocomplete and csharp-ls (#4495)
1 parent 567990b commit 5298775

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

clients/lsp-csharp.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,10 @@ filename is returned so lsp-mode can display this file."
504504

505505
(defun lsp-csharp--cls-find-executable ()
506506
(or (when lsp-csharp-csharpls-use-dotnet-tool
507-
(-flatten (list "dotnet" (if lsp-csharp-csharpls-use-local-tool (list "tool" "run") "") "csharp-ls")))
508-
(executable-find "csharp-ls")
509-
;; NOTE[gastove|2023-02-03] This approach might be remove-able if we
510-
;; standardize on going through the `dotnet' cli.
507+
(if lsp-csharp-csharpls-use-local-tool
508+
(list "dotnet" "tool" "run" "csharp-ls")
509+
(list "csharp-ls")))
510+
(executable-find "csharp-ls")
511511
(f-join (or (getenv "USERPROFILE") (getenv "HOME"))
512512
".dotnet" "tools" "csharp-ls")))
513513

clients/lsp-fsharp.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ UPDATE? is t."
199199
(defun lsp-fsharp--fsac-cmd ()
200200
"The location of fsautocomplete executable."
201201
(or (when lsp-fsharp-use-dotnet-tool-for-fsac
202-
(list "dotnet" (if lsp-fsharp-use-dotnet-local-tool "" "tool") "run" "fsautocomplete"))
202+
(if lsp-fsharp-use-dotnet-local-tool
203+
(list "dotnet" "tool" "run" "fsautocomplete")
204+
(list "fsautocomplete")))
203205
(-let [maybe-local-executable (expand-file-name "fsautocomplete" lsp-fsharp-server-install-dir)]
204206
(when (f-exists-p maybe-local-executable)
205207
maybe-local-executable))

0 commit comments

Comments
 (0)