Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct global tool commands for fsharpautocomplete and csharp-ls #4495

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions clients/lsp-csharp.el
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ filename is returned so lsp-mode can display this file."

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

Expand Down
4 changes: 3 additions & 1 deletion clients/lsp-fsharp.el
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ UPDATE? is t."
(defun lsp-fsharp--fsac-cmd ()
"The location of fsautocomplete executable."
(or (when lsp-fsharp-use-dotnet-tool-for-fsac
(list "dotnet" (if lsp-fsharp-use-dotnet-local-tool "" "tool") "run" "fsautocomplete"))
(if lsp-fsharp-use-dotnet-local-tool
(list "dotnet" "tool" "run" "fsautocomplete")
(list "fsautocomplete")))
(-let [maybe-local-executable (expand-file-name "fsautocomplete" lsp-fsharp-server-install-dir)]
(when (f-exists-p maybe-local-executable)
maybe-local-executable))
Expand Down
Loading