Subject: bug#75954: [PATCH] eglot: Allow omnisharp binary to be capitalized "OmniSharp"

From: Damien Cassou <[email-masked]>
Date: Thu, 30 Jan 2025 22:15:21 +0100

Tags: patch

Hi,

some packages provide a binary "OmniSharp" instead of "omnisharp". In
a case-sensitive file-systems this means eglot will not find the binary
file and won't work.

Best

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
>From 3bb0ea1968880fa4572b139a9b284ec187eae9a9 Mon Sep 17 00:00:00 2001
From: Damien Cassou <[email-masked]>
Date: Thu, 30 Jan 2025 21:44:31 +0100
Subject: [PATCH] eglot: Allow omnisharp binary to be capitalized "OmniSharp"

Some packages provide a binary "OmniSharp" instead of "omnisharp" which
breaks in case-sensitive file-systems.

* lisp/progmodes/eglot.el (eglot-server-programs): Add "OmniSharp" as
valid binary name to search for.
---
 lisp/progmodes/eglot.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index c2a8562eb97..38ab44bae69 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -325,6 +325,7 @@ eglot-server-programs
     ((csharp-mode csharp-ts-mode)
      . ,(eglot-alternatives
          '(("omnisharp" "-lsp")
+           ("OmniSharp" "-lsp")
            ("csharp-ls"))))
     (purescript-mode . ("purescript-language-server" "--stdio"))
     ((perl-mode cperl-mode)
-- 
2.47.1