You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2025. It is now read-only.
-[`roslyn`](https://github.com/crashdummyy/roslynlanguageserver) - The C# language server. Required for all C# and Razor/Blazor integrations.<br/>
61
+
-[`rzls`](https://github.com/crashdummyy/rzls) - The Razor language server. Handles Razor/Blazor/CSHTML integrations.<br/>
62
+
-[`html-lsp`](https://github.com/microsoft/vscode-html-languageservice) - The HTML language server. Provides completions and formatting for HTML inside `.razor` files.<br/>
63
+
-[`seblyng/roslyn.nvim`](https://github.com/seblyng/roslyn.nvim) - Neovim integration for `roslyn`. Handles communication between Neovim and the `roslyn` language server.<br/>
To ensure seamless communication between `roslyn.nvim` and `rzls`, you need to configure `roslyn.nvim` with specific command-line arguments and handlers provided by `rzls.nvim`. This involves composing the `roslyn` language server command with arguments that point to the installed `rzls`. You’ll also need to pass the handler functions defined in the `rzls.roslyn_handlers` module to `roslyn.nvim`'s setup.
96
90
97
-
Manually:
91
+
Below are examples showing how to assemble the `cmd` for both manual and Mason installations, followed by how to use this command in your `roslyn.nvim``setup()`.
92
+
93
+
#### Manually
98
94
99
95
```lua
100
96
-- Adjust these paths to where you installed Roslyn and rzls.
Finally, use the composed `cmd` and rzls handlers like so:
135
-
131
+
Finally, regardless of which method you used to compose the `cmd` table, use it together with `rzls.roslyn_handlers` in your `roslyn.nvim` setup like so:
136
132
```lua
137
133
require("roslyn").setup({
138
134
cmd=cmd,
139
135
config= {
140
-
--the rest of your Roslyn configuration
136
+
--The rest of your Roslyn configuration
141
137
handlers=require("rzls.roslyn_handlers"),
142
138
},
143
139
})
144
140
```
145
141
146
-
## Example configuration
142
+
### Configuring `rzls.nvim`
143
+
144
+
You can customize `rzls.nvim` by passing a configuration table to its `setup` function. Here are the options:
145
+
146
+
-**`capabilities`**
147
+
A table describing what features your LSP client supports (like completion, hover, etc.).
148
+
If you're using a completion plugin (like `nvim-cmp`), you can pass its capabilities here.
149
+
If you're unsure, you can leave this out or consult the documentation of your completion provider.
150
+
151
+
-**`path`**
152
+
The file system path to the `rzls` executable.
153
+
If you installed `rzls` via Mason, you don't need to set this.
154
+
But if you installed it manually, set this to the full path to your `rzls` binary.
155
+
156
+
-**`on_attach`**
157
+
A function called when the language server attaches to a buffer, often used to set up keymaps or other buffer-local settings.
158
+
If you already manage `on_attach` globally (e.g., via autocommands), you can omit this or provide an empty function.
147
159
148
160
```lua
149
-
return {
150
-
{
151
-
"seblyng/roslyn.nvim",
152
-
ft= { "cs", "razor" },
153
-
dependencies= {
154
-
{
155
-
-- By loading as a dependencies, we ensure that we are available to set
156
-
-- the handlers for Roslyn.
157
-
"tris203/rzls.nvim",
158
-
config=true,
159
-
},
160
-
},
161
-
config=function()
162
-
-- Use one of the methods in the Integration section to compose the command.
0 commit comments