дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 01:31:41 +02:00
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]>
48 рядки
2.2 KiB
TOML
48 рядки
2.2 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
|
||
|
||
# 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"
|