дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(csharp): apply Roslyn's suppress and severity quick fixes (#7667)
Choosing Roslyn's "Suppress or configure issues" on a C# diagnostic did nothing: Roslyn returns its entries in the client command roslyn.client.nestedCodeAction, which the IDE did not handle. The entries are now listed by group (suppress, severity of the ID, of its category, of all analyzers) and applied like other code actions, so severities are written to .editorconfig. A newly created .editorconfig was ignored until a project reload, so the projects below it are now reported to Roslyn as changed. The real Roslyn test is ignored by default. Closes #7646 Co-authored-by: wildcatDownstairs <[email protected]>
Цей коміт міститься в:
1 джерело
62bac6ec8c
коміт
27164e8919
10 files changed
+535
-3
No files matched your search
@@ -18,6 +18,8 @@ With Roslyn, the editor shows inlay hints: parameter names before literals, `new
|
||||
|
||||
The server loads the solution or project it finds from these markers. FsAutoComplete starts with `AutomaticWorkspaceInit` on, so it loads the projects without waiting for the editor to ask.
|
||||
|
||||
With Roslyn, `⌥↵` / `Alt+Enter` on a diagnostic offers **Suppress or configure issues**. Its entries are grouped: suppress the diagnostic, or set its severity (None, Silent, Suggestion, Warning, Error), that of its category or of all analyzers. A severity is written to the nearest `.editorconfig`; without one, the server creates it beside the solution (or the project, when there is none). The change is undoable and the diagnostics update without restarting the server.
|
||||
|
||||
When you go to the definition of a library type, the server returns decompiled source. It opens as a read-only document, and so does source-generated code.
|
||||
|
||||
`ProjectSettings/ProjectVersion.txt` is there so that Unity projects work too. See [Unity](/en/languages/unity) for using OpenIDEA as Unity's external editor.
|
||||
|
||||
@@ -18,6 +18,8 @@ C# 在装了 Roslyn 语言服务器时用它,否则用 csharp-ls。Roslyn 是
|
||||
|
||||
语言服务器会加载根据这些标记找到的解决方案或项目。FsAutoComplete 启动时开启了 `AutomaticWorkspaceInit`,无需等待编辑器请求就会自动加载项目。
|
||||
|
||||
使用 Roslyn 时,在诊断上按 `⌥↵` / `Alt+Enter` 会出现 **Suppress or configure issues**,条目按组排列:抑制该诊断,或设置它、它所属类别或全部分析器的严重级别(None、Silent、Suggestion、Warning、Error)。级别写入最近的 `.editorconfig`;没有该文件时,服务器在解决方案旁(没有解决方案时在项目旁)创建。修改可以撤销,诊断无需重启服务器即可更新。
|
||||
|
||||
跳转到类库类型的定义时,语言服务器返回反编译后的源码,以只读文档打开;源生成器生成的代码同样以只读方式打开。
|
||||
|
||||
`ProjectSettings/ProjectVersion.txt` 这个标记是为 Unity 项目准备的。把 OpenIDEA 设为 Unity 外部编辑器的方法见 [Unity](/zh/languages/unity)。
|
||||
|
||||
Reference in new issue
Заблокувати користувача