-
Notifications
You must be signed in to change notification settings - Fork 416
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
Multiple omnisharp.json settings for one project #1208
Comments
@ypapouin thanks for a feature request. could you provide a bit more background on what you are trying to do? you have a single solution, where you load multiple projects, but would like to effectively have per-project settings based on the paths, am I understanding you correctly? Because you can already have multiple omnisharp.json files on different levels, what matters is the startup folder though - OmniSharp will select the one in the current startup directory. |
Thanks for moving issue to the right project. Actually I have a single solution with a single project, but my project is versioned using git and some third-party libraries (as source code) that are set in their own sub-folder. All these libraries sub-folders are git sub-modules since they are maintained for multiple project. But their maintainer have different formatting options:
Would be nice to be able to have:
or:
|
Wouldn't this be better solved by supporting |
+1 |
That's pretty much what I'm looking for. We're trying to support a nice editing experience for Abbot (see Background section here for more context). I want to have different references (rsp) for different folders. In Abbot, a project might have multiple "skill" folders. Each skill is a script (
The "script": {
"enabled": true,
"defaultTargetFramework": "net5.0",
"enableScriptNuGetReferences": true,
"RspFilePath": "references.rsp"
}
} But each skill may have a different set of usings and references, hence each one gets its own rsp file. What I would hope to happen is when editing And if someone opens VS Code pointing to a skill folder, I want it all to continue to work. Does that make sense? |
I do not think this is relevant anymore in the original form. The original formatting problem from this issue was already resolved by implementing the full support for editorconfig and its hierarchical structure. The use case that you describe is one that I think is a reasonable one, but it's also a very specific example in one very concrete part of the config. However, at the moment |
We have decided to not implement this in favor of |
From @ypapouin on May 31, 2018 11:20
Currently, you can override FormattingOptions by placing an omnisharp.json file at the project root folder.
In my projects, I'm using a lot of sub-modules (git) developed by third parties with different C# settings, but all changes made (for merge request to upstream) in these sub-modules must be formatted by hand to avoid losing original formatting.
I would be happy to be able to customize FormattingOptions for each of these sub-modules.
For each folder containing an omnisharp.json, all sub-folder would recursively apply these settings until a new omnisharp.json is found.
Environment data
dotnet --info
output:Outils en ligne de commande .NET (2.1.104)
Product Information:
Version: 2.1.104
Commit SHA-1 hash: 48ec687460
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.104\
Microsoft .NET Core Shared Framework Host
Version : 2.0.6
Build : 74b1c703813c8910df5b96f304b0f2b78cdf194d
VS Code version: 1.23.1
C# Extension version: 1.15.2
Copied from original issue: dotnet/vscode-csharp#2357
The text was updated successfully, but these errors were encountered: