OmniSharp / omnisharp-emacs

Troll coworkers - use Emacs at work for csharp!
GNU General Public License v3.0
512 stars 94 forks source link

file-local variable for solution path? #483

Open unhammer opened 5 years ago

unhammer commented 5 years ago

I work on a project that happens to have two .sln files in the same dir as the .cs file, so omnisharp keeps asking me which one I want. Could we please have something like

(defcustom omnisharp-preferred-solution-path nil
  "Path to preferred solution file in case of ambiguity.
If this is set to the path of a soluton file, prefer it when
there are multiple projects.  Hint: Set it with
`add-dir-local-variable' in the project root to make it global
for this project."
  :safe #'stringp)

that can be used to avoid "omnisharp: no unambigious project path could be found" ?

razzmatazz commented 5 years ago

Sorry for replying after this long time.

As usual, I am kind of weary of adding too many customization points since we would have to maintain that all along. I am not against this approach, I am just loud-out thinking what the other options could be?

What about pre-selecting last solution for a file? So hitting enter blindly would do the job for you, or is it still too much noise?