Файли
openidea/languages/razor.toml
T
Glitched Polygons GmbH 75ec6c51a3 feat(csharp): Razor / cshtml / ASP.NET Core MVC support (#7256)
Razor (.cshtml/.razor) gets syntax highlighting, Roslyn's built-in Razor support with the HTML parts projected to the HTML language server (ordered open/close, a reserved projection URI, scoped capability registrations), and MVC navigation between controller actions and their views, including explicit View("...") names, subfolders and areas.

Closes #615

Co-authored-by: GlitchedPolygons <[email protected]>
2026-12-02 16:32:46 +08:00

48 рядки
2.2 KiB
TOML
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
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
# 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"