дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 01:01:17 +02:00
Roslyn completes types from namespaces a file doesn't import and adds the using directive on accept; csharp-ls 0.14+ no longer lists such types. - languages/csharp.toml: roslyn-language-server first (--stdio --autoLoadProjects, unimported-namespace completion on), csharp-ls as its fallback. - ide-tools: DotnetTool gains prerelease and min_sdk. Roslyn ships only prerelease, platform-specific tool packages, so it installs with --prerelease and needs the .NET 10 SDK; an older SDK gets an error that names the SDK and suggests csharp-ls. - Docs: C#, Unity and the support matrix describe both servers. Fixes #7124
34 рядки
1.3 KiB
TOML
34 рядки
1.3 KiB
TOML
id = "csharp"
|
||
name = "C#"
|
||
extensions = ["cs", "csx"]
|
||
line-comment = "//"
|
||
block-comment = ["/*", "*/"]
|
||
indent = { tab-size = 4, insert-spaces = true }
|
||
ui-mode = "C#"
|
||
tree-sitter = "csharp"
|
||
|
||
[[language-servers]]
|
||
name = "roslyn-language-server"
|
||
command = "roslyn-language-server"
|
||
# --autoLoadProjects: the server finds and opens the solution or projects itself.
|
||
args = ["--stdio", "--autoLoadProjects", "--telemetryLevel", "off"]
|
||
root-markers = ["*.sln", "*.slnx", "*.csproj", "global.json", "Directory.Build.props", "ProjectSettings/ProjectVersion.txt"]
|
||
install-hint = "Install Roslyn (C#) in Settings › Languages & Frameworks › Language Servers (needs the .NET 10 SDK), or csharp-ls for older SDKs"
|
||
|
||
[language-servers.settings."csharp|completion"]
|
||
dotnet_show_completion_items_from_unimported_namespaces = true
|
||
|
||
[[language-servers]]
|
||
name = "csharp-ls"
|
||
# Alternative: used only when the server above is not installed.
|
||
fallback = true
|
||
command = "csharp-ls"
|
||
root-markers = ["*.sln", "*.slnx", "*.csproj", "global.json", "Directory.Build.props", "ProjectSettings/ProjectVersion.txt"]
|
||
install-hint = "dotnet tool install --global csharp-ls"
|
||
|
||
[debugger]
|
||
adapter = "netcoredbg"
|
||
command = "netcoredbg"
|
||
args = ["--interpreter=vscode"]
|
||
install-hint = "Install netcoredbg (.NET debugger) in Settings › Languages & Frameworks › Language Servers"
|