csharp

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

View Source
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.

View Source
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.

View Source
const ContentScheme = "csharp"

ContentScheme is the scheme of the documents the pack provides: the scheme of the URIs csharp-ls uses.

View Source
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

func New

func New() extension.Extension

New is the Factory of the pack.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL