diff options
| author | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2025-04-25 18:41:52 +0000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2025-04-25 18:41:52 +0000 |
| commit | 22a6ada3424d12ffb62f97b5d10c7119ccb0309f (patch) | |
| tree | de63b37e265dd5ef014a0b2d25cd9a05ee9c2554 | |
| parent | feat(roslyn_ls): add initial config as `vim.lsp.config` #3753 (diff) | |
| download | nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.tar nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.tar.gz nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.tar.bz2 nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.tar.lz nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.tar.xz nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.tar.zst nvim-lspconfig-22a6ada3424d12ffb62f97b5d10c7119ccb0309f.zip | |
docs: update configs.md
skip-checks: true
| -rw-r--r-- | doc/configs.md | 105 | ||||
| -rw-r--r-- | doc/configs.txt | 103 |
2 files changed, 208 insertions, 0 deletions
diff --git a/doc/configs.md b/doc/configs.md index 36a762ed..5956b99d 100644 --- a/doc/configs.md +++ b/doc/configs.md @@ -243,6 +243,7 @@ Nvim by running `:help lspconfig-all`. - [robotframework_ls](#robotframework_ls) - [roc_ls](#roc_ls) - [rome](#rome) +- [roslyn_ls](#roslyn_ls) - [rpmspec](#rpmspec) - [rubocop](#rubocop) - [ruby_lsp](#ruby_lsp) @@ -9000,6 +9001,110 @@ Default config: --- +## roslyn_ls + +https://github.com/dotnet/roslyn + +To install the server, compile from source or download as nuget package. +Go to `https://dev.azure.com/azure-public/vside/_artifacts/feed/vs-impl/NuGet/Microsoft.CodeAnalysis.LanguageServer.<platform>/overview` +replace `<platform>` with one of the following `linux-x64`, `osx-x64`, `win-x64`, `neutral` (for more info on the download location see https://github.com/dotnet/roslyn/issues/71474#issuecomment-2177303207). +Download and extract it (nuget's are zip files). +- if you chose `neutral` nuget version, then you have to change the `cmd` like so: + cmd = { + 'dotnet', + '<my_folder>/Microsoft.CodeAnalysis.LanguageServer.dll', + '--logLevel', -- this property is required by the server + 'Information', + '--extensionLogDirectory', -- this property is required by the server + fs.joinpath(uv.os_tmpdir(), 'roslyn_ls/logs'), + '--stdio', + }, + where `<my_folder>` has to be the folder you extracted the nuget package to. +- for all other platforms put the extracted folder to neovim's PATH (`vim.env.PATH`) + +Snippet to enable the language server: +```lua +require'lspconfig'.roslyn_ls.setup{} +``` + +Default config: +- `capabilities` : + ```lua + { + textDocument = { + diagnostic = { + dynamicRegistration = true + } + } + } + ``` +- `cmd` : + ```lua + { "Microsoft.CodeAnalysis.LanguageServer", "--logLevel", "Information", "--extensionLogDirectory", "/tmp/roslyn_ls/logs", "--stdio" } + ``` +- `filetypes` : + ```lua + { "cs" } + ``` +- `handlers` : + ```lua + { + ["razor/provideDynamicFileInfo"] = <function 1>, + ["workspace/_roslyn_projectHasUnresolvedDependencies"] = <function 2>, + ["workspace/_roslyn_projectNeedsRestore"] = <function 3>, + ["workspace/projectInitializationComplete"] = <function 4> + } + ``` +- `name` : + ```lua + "roslyn_ls" + ``` +- `offset_encoding` : + ```lua + "utf-8" + ``` +- `on_init` : + ```lua + { <function 1> } + ``` +- `root_dir` source (use "gF" to open): [../lsp/roslyn_ls.lua:92](../lsp/roslyn_ls.lua#L92) +- `settings` : + ```lua + { + ["csharp|background_analysis"] = { + dotnet_analyzer_diagnostics_scope = "fullSolution", + dotnet_compiler_diagnostics_scope = "fullSolution" + }, + ["csharp|code_lens"] = { + dotnet_enable_references_code_lens = true + }, + ["csharp|completion"] = { + dotnet_provide_regex_completions = true, + dotnet_show_completion_items_from_unimported_namespaces = true, + dotnet_show_name_completion_suggestions = true + }, + ["csharp|inlay_hints"] = { + csharp_enable_inlay_hints_for_implicit_object_creation = true, + csharp_enable_inlay_hints_for_implicit_variable_types = true, + csharp_enable_inlay_hints_for_lambda_parameter_types = true, + csharp_enable_inlay_hints_for_types = true, + dotnet_enable_inlay_hints_for_indexer_parameters = true, + dotnet_enable_inlay_hints_for_literal_parameters = true, + dotnet_enable_inlay_hints_for_object_creation_parameters = true, + dotnet_enable_inlay_hints_for_other_parameters = true, + dotnet_enable_inlay_hints_for_parameters = true, + dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true, + dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true, + dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true + }, + ["csharp|symbol_search"] = { + dotnet_search_reference_assemblies = true + } + } + ``` + +--- + ## rpmspec https://github.com/dcermak/rpm-spec-language-server diff --git a/doc/configs.txt b/doc/configs.txt index e1881463..7be95686 100644 --- a/doc/configs.txt +++ b/doc/configs.txt @@ -8421,6 +8421,109 @@ Default config: ------------------------------------------------------------------------------ +roslyn_ls + +https://github.com/dotnet/roslyn + +To install the server, compile from source or download as nuget package. +Go to `https://dev.azure.com/azure-public/vside/_artifacts/feed/vs-impl/NuGet/Microsoft.CodeAnalysis.LanguageServer.<platform>/overview` +replace `<platform>` with one of the following `linux-x64`, `osx-x64`, `win-x64`, `neutral` (for more info on the download location see https://github.com/dotnet/roslyn/issues/71474#issuecomment-2177303207). +Download and extract it (nuget's are zip files). +- if you chose `neutral` nuget version, then you have to change the `cmd` like so: + cmd = { + 'dotnet', + '<my_folder>/Microsoft.CodeAnalysis.LanguageServer.dll', + '--logLevel', -- this property is required by the server + 'Information', + '--extensionLogDirectory', -- this property is required by the server + fs.joinpath(uv.os_tmpdir(), 'roslyn_ls/logs'), + '--stdio', + }, + where `<my_folder>` has to be the folder you extracted the nuget package to. +- for all other platforms put the extracted folder to neovim's PATH (`vim.env.PATH`) + +Snippet to enable the language server: >lua + vim.lsp.enable('roslyn_ls') + + +Default config: +- `capabilities` : + ```lua + { + textDocument = { + diagnostic = { + dynamicRegistration = true + } + } + } + ``` +- `cmd` : + ```lua + { "Microsoft.CodeAnalysis.LanguageServer", "--logLevel", "Information", "--extensionLogDirectory", "/tmp/roslyn_ls/logs", "--stdio" } + ``` +- `filetypes` : + ```lua + { "cs" } + ``` +- `handlers` : + ```lua + { + ["razor/provideDynamicFileInfo"] = <function 1>, + ["workspace/_roslyn_projectHasUnresolvedDependencies"] = <function 2>, + ["workspace/_roslyn_projectNeedsRestore"] = <function 3>, + ["workspace/projectInitializationComplete"] = <function 4> + } + ``` +- `name` : + ```lua + "roslyn_ls" + ``` +- `offset_encoding` : + ```lua + "utf-8" + ``` +- `on_init` : + ```lua + { <function 1> } + ``` +- `root_dir` source (use "gF" to open): [../lsp/roslyn_ls.lua:92](../lsp/roslyn_ls.lua#L92) +- `settings` : + ```lua + { + ["csharp|background_analysis"] = { + dotnet_analyzer_diagnostics_scope = "fullSolution", + dotnet_compiler_diagnostics_scope = "fullSolution" + }, + ["csharp|code_lens"] = { + dotnet_enable_references_code_lens = true + }, + ["csharp|completion"] = { + dotnet_provide_regex_completions = true, + dotnet_show_completion_items_from_unimported_namespaces = true, + dotnet_show_name_completion_suggestions = true + }, + ["csharp|inlay_hints"] = { + csharp_enable_inlay_hints_for_implicit_object_creation = true, + csharp_enable_inlay_hints_for_implicit_variable_types = true, + csharp_enable_inlay_hints_for_lambda_parameter_types = true, + csharp_enable_inlay_hints_for_types = true, + dotnet_enable_inlay_hints_for_indexer_parameters = true, + dotnet_enable_inlay_hints_for_literal_parameters = true, + dotnet_enable_inlay_hints_for_object_creation_parameters = true, + dotnet_enable_inlay_hints_for_other_parameters = true, + dotnet_enable_inlay_hints_for_parameters = true, + dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true, + dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true, + dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true + }, + ["csharp|symbol_search"] = { + dotnet_search_reference_assemblies = true + } + } + ``` + + +------------------------------------------------------------------------------ rpmspec https://github.com/dcermak/rpm-spec-language-server |
