Documentation
¶
Overview ¶
Package csharp is the C# language pack (SPEC §8.1, §10.15, §10.34): C#. The grammar and the language configuration are in assets/, copied by scripts/update-assets.sh; the licenses are in third_party/ and NOTICE. Since step 24b.7 the pack also runs csharp-ls, the MIT-licensed Roslyn language server (no C# Dev Kit and no part with Microsoft's terms, D49): the server is found, started and shown by extensions/internal/langserver (the path setting csharp.languageServer.path, csharp-ls on PATH, then the folder of the .NET global tools, the status item, the notification for a missing server), the pack checks that the .NET SDK is there, chooses the solution or project the server loads (csharp.solution, the choice of "C#: Select Solution" kept per folder, else the one the folder holds), sends the settings of csharp-ls, and shows the decompiled and generated sources of the server (csharp/metadata) as read-only documents.
Index ¶
Constants ¶
const ( // ID is the id of the extension, and ServerID the id of the language server csharp-ls in its manifest. ID = "emetos.csharp" ServerID = "csharp-ls" )
The ids of the pack.
const ( // PathSetting holds the path of the csharp-ls program. PathSetting = "csharp.languageServer.path" // TraceSetting traces the traffic with the server (the host's). TraceSetting = "csharp.trace.server" // LogLevelSetting is the log level of csharp-ls (--loglevel and csharp.logLevel). LogLevelSetting = "csharp.logLevel" // AnalyzersSetting runs the Roslyn analyzers as part of the diagnostics. AnalyzersSetting = "csharp.analyzersEnabled" // ApplyFormattingSetting uses the formatting options of the editor, which may override the .editorconfig of the project. ApplyFormattingSetting = "csharp.applyFormattingOptions" // LocaleSetting forces the language of the messages of the server (--locale). LocaleSetting = "csharp.locale" )
The keys of the settings.
const ( // StateKey is the key of the state under which the file the user chose for the folder is kept (extension.State). StateKey = "csharp.solution" // SolutionSetting names the solution or project to load when the user chose none for the folder. SolutionSetting = "csharp.solution" )
The files that name what is loaded.
const ContentScheme = "csharp"
ContentScheme is the scheme of the documents the pack provides: the scheme of the URIs csharp-ls uses.
const SelectSolutionCommand = "csharp.selectSolution"
SelectSolutionCommand lets the user choose the solution or project csharp-ls loads ("C#: Select Solution").
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.