дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
Roslyn's inlay hints are off unless the client turns them on, and csharp.toml passed no csharp|inlay_hints settings, so C# showed no parameter name or type hints. csharp.toml and razor.toml now enable parameter hints for literals, new-expressions and indexers (with Roslyn's suppressions) and var/lambda parameter types. Parameter info matches string parameter labels as whole words from the parameter list on (all servers) and keeps a variadic last parameter (params, ..., *args) bold. The real-server test is ignored by default (needs the .NET SDK). Closes #7678 Co-authored-by: wildcatDownstairs <[email protected]>
67 рядки
3.4 KiB
TOML
67 рядки
3.4 KiB
TOML
id = "razor"
|
||
name = "Razor"
|
||
# MVC views and Razor Pages (`.cshtml`), Razor components (`.razor`).
|
||
extensions = ["cshtml", "razor"]
|
||
block-comment = ["@*", "*@"]
|
||
indent = { tab-size = 4, insert-spaces = true }
|
||
ui-mode = "Razor"
|
||
# Outline, folding and project symbols of the markup.
|
||
tree-sitter = "html"
|
||
|
||
# Rainbow brackets › angle: editor syntax nodes of markup tags, whose `<` `>` pair up.
|
||
[rainbow-brackets]
|
||
tags = ["OpenTag", "CloseTag", "SelfClosingTag"]
|
||
|
||
# Razor is part of the Roslyn language server (cohosting): the same instance as the project's
|
||
# C# files, so it sees the project's model types, tag helpers and components. The HTML of a
|
||
# view comes from vscode-html-language-server, which the IDE runs on the server's behalf.
|
||
# Keep this entry identical to the one in csharp.toml: whichever file opens first starts it.
|
||
[[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)"
|
||
|
||
[language-servers.settings."csharp|completion"]
|
||
dotnet_show_completion_items_from_unimported_namespaces = true
|
||
|
||
# Roslyn's inlay hints are off unless asked for (#7678). Parameter names where the argument
|
||
# doesn't say what it is (literals, `new X()`, indexers), not at variables and other expressions;
|
||
# the types of `var` and lambda parameters. Editor › Inlay Hints turns each kind off.
|
||
[language-servers.settings."csharp|inlay_hints"]
|
||
dotnet_enable_inlay_hints_for_parameters = true
|
||
dotnet_enable_inlay_hints_for_literal_parameters = true
|
||
dotnet_enable_inlay_hints_for_object_creation_parameters = true
|
||
dotnet_enable_inlay_hints_for_indexer_parameters = true
|
||
dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true
|
||
dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true
|
||
dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true
|
||
csharp_enable_inlay_hints_for_types = true
|
||
csharp_enable_inlay_hints_for_implicit_variable_types = true
|
||
csharp_enable_inlay_hints_for_lambda_parameter_types = true
|
||
dotnet_enable_inlay_hints_for_other_parameters = false
|
||
# On by default in Roslyn; the type is mostly written beside them already (#7326).
|
||
csharp_enable_inlay_hints_for_implicit_object_creation = false
|
||
csharp_enable_inlay_hints_for_collection_expressions = false
|
||
|
||
# Tailwind CSS: class completion, hover and diagnostics, only in a project that uses Tailwind
|
||
# (`tailwind.config.*` or `tailwindcss` in package.json). After the language's own servers,
|
||
# which answer hover first.
|
||
[[language-servers]]
|
||
name = "tailwindcss-language-server"
|
||
command = "tailwindcss-language-server"
|
||
args = ["--stdio"]
|
||
root-markers = ["tailwind.config.*", "package.json#dependencies.tailwindcss", "package.json#devDependencies.tailwindcss"]
|
||
require-root-marker = true
|
||
install-hint = "npm i -g @tailwindcss/language-server"
|
||
|
||
# Views compile into the app with their line mappings: breakpoints in their C# are hit by a
|
||
# .NET debug configuration.
|
||
[debugger]
|
||
adapter = "netcoredbg"
|
||
command = "netcoredbg"
|
||
args = ["--interpreter=vscode"]
|
||
install-hint = "Install netcoredbg (.NET debugger) in Settings › Languages & Frameworks › Language Servers"
|