这是一个围绕 Roslyn 语言服务器的包装,使其与 VSCode 以外的编辑器兼容
Microsoft has released official support for running the language server outside of vscode, under the name roslyn-language-server. This solves all the issue that this project used to address.
roslyn-language-server should be used instead, and this project is considered deprecated.
I would like to thank the roslyn language server team for providing official support.
A wrapper around the language server behind the C# Visual Studio Code extension, Microsoft.CodeAnalysis.LanguageServer, which makes it compatible with other editors, e.g., Helix or Neovim.
This language server is more stable and faster than OmniSharp.
This tool assists the use of Microsoft.CodeAnalysis.LanguageServer:
Microsoft.CodeAnalysis.LanguageServerMicrosoft.CodeAnalysis.LanguageServer as a processinitialize notification from the client, and finds relevant .sln, .slnx or .csproj files and sends them to the server as a custom open notification.Microsoft.CodeAnalysis.LanguageServer is not intended to function as a standalone language server; it is designed to work together with an editor extension. This project is not an extension, it is only a tool to download and run Microsoft.CodeAnalysis.LanguageServer.
As a result, there are a few quirks you should be aware of. These can all be resolved through editor extension code, but not here, as doing so would break communication between the server and client.
Projects are not automatically restored
Diagnostics are pulled before the project is fully loaded
Download the binaries that match your platform under Releases
cargo install csharp-language-server
The tool will download Microsoft.CodeAnalysis.LanguageServer at the first launch. It may take some seconds. To avoid this, you can run csharp-language-server --download before your first launch. This is useful for install scripts.
Helix requires the latest version from git, to support diagnostics.
[language-server.csharp]
command = "csharp-language-server"
[[language]]
name = "c-sharp"
language-servers = ["csharp"]vim.api.nvim_create_autocmd('FileType', {
pattern = 'cs',
callback = function(args)
local root_dir = vim.fs.dirname(
vim.fs.find({ '.sln', '.slnx', '.csproj', '.git' }, { upward = true })[1]
)
vim.lsp.start({
name = 'csharp-language-server',
cmd = {'csharp-language-server'},
root_dir = root_dir,
})
end,
})This is now the default language server for zed 0.218 and later.
No need to configure anything.
暂无开放 Issues,或尚未同步最近议题。