mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/lsp: add omnisharp language server
Co-authored-by: garaiza-93 <57430880+garaiza-93@users.noreply.github.com>
This commit is contained in:
parent
f1aaef47a9
commit
54ebe3b0ee
4 changed files with 77 additions and 1 deletions
|
@ -377,6 +377,60 @@ with lib; let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "omnisharp";
|
||||||
|
description = "Enable omnisharp language server, for C#";
|
||||||
|
package = pkgs.omnisharp-roslyn;
|
||||||
|
cmd = cfg: ["${cfg.package}/bin/OmniSharp"];
|
||||||
|
settings = cfg: {omnisharp = cfg;};
|
||||||
|
settingsOptions = {
|
||||||
|
enableEditorConfigSupport = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
Enables support for reading code style, naming convention and analyzer settings from
|
||||||
|
`.editorconfig`.
|
||||||
|
'';
|
||||||
|
|
||||||
|
enableMsBuildLoadProjectsOnDemand = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
If true, MSBuild project system will only load projects for files that were opened in the
|
||||||
|
editor.
|
||||||
|
This setting is useful for big C# codebases and allows for faster initialization of code
|
||||||
|
navigation features only for projects that are relevant to code that is being edited.
|
||||||
|
With this setting enabled OmniSharp may load fewer projects and may thus display
|
||||||
|
incomplete reference lists for symbols.
|
||||||
|
'';
|
||||||
|
|
||||||
|
enableRoslynAnalyzers = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
If true, MSBuild project system will only load projects for files that were opened in the
|
||||||
|
editor.
|
||||||
|
This setting is useful for big C# codebases and allows for faster initialization of code
|
||||||
|
navigation features only for projects that are relevant to code that is being edited.
|
||||||
|
With this setting enabled OmniSharp may load fewer projects and may thus display
|
||||||
|
incomplete reference lists for symbols.
|
||||||
|
'';
|
||||||
|
|
||||||
|
organizeImportsOnFormat = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
Specifies whether 'using' directives should be grouped and sorted during document
|
||||||
|
formatting.
|
||||||
|
'';
|
||||||
|
|
||||||
|
enableImportCompletion = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
Enables support for showing unimported types and unimported extension methods in
|
||||||
|
completion lists.
|
||||||
|
When committed, the appropriate using directive will be added at the top of the current
|
||||||
|
file.
|
||||||
|
This option can have a negative impact on initial completion responsiveness, particularly
|
||||||
|
for the first few completion sessions after opening a solution.
|
||||||
|
'';
|
||||||
|
|
||||||
|
sdkIncludePrereleases = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
Specifies whether to include preview versions of the .NET SDK when determining which
|
||||||
|
version to use for project loading.
|
||||||
|
'';
|
||||||
|
|
||||||
|
analyzeOpenDocumentsOnly = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
Only run analyzers against open files when 'enableRoslynAnalyzers' is true.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "pylsp";
|
name = "pylsp";
|
||||||
description = "Enable pylsp, for Python.";
|
description = "Enable pylsp, for Python.";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs}: {
|
{
|
||||||
example = {
|
example = {
|
||||||
plugins.lsp = {
|
plugins.lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
metals.enable = true;
|
metals.enable = true;
|
||||||
nil_ls.enable = true;
|
nil_ls.enable = true;
|
||||||
nixd.enable = true;
|
nixd.enable = true;
|
||||||
|
omnisharp.enable = true;
|
||||||
pylsp.enable = true;
|
pylsp.enable = true;
|
||||||
pyright.enable = true;
|
pyright.enable = true;
|
||||||
rnix-lsp.enable = true;
|
rnix-lsp.enable = true;
|
||||||
|
|
21
tests/test-sources/plugins/lsp/omnisharp.nix
Normal file
21
tests/test-sources/plugins/lsp/omnisharp.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
defaults = {
|
||||||
|
plugins.lsp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
servers.omnisharp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
enableEditorConfigSupport = true;
|
||||||
|
enableMsBuildLoadProjectsOnDemand = false;
|
||||||
|
enableRoslynAnalyzers = false;
|
||||||
|
organizeImportsOnFormat = false;
|
||||||
|
enableImportCompletion = false;
|
||||||
|
sdkIncludePrereleases = true;
|
||||||
|
analyzeOpenDocumentsOnly = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue