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
local function find_root_pattern(fname, lua_pattern)
@@ -167,22 +176,58 @@
167
176
extraServerPlugins={
168
177
omnisharp=["omnisharp-extended-lsp-nvim"];
169
178
csharp_ls=["csharpls-extended-lsp-nvim"];
170
-
roslyn_ls=[];
179
+
roslyn=["roslyn-nvim"];
171
180
};
172
181
173
182
cfg=config.vim.languages.csharp;
174
183
in{
175
184
options={
176
185
vim.languages.csharp={
177
-
enable=mkEnableOption"C# language support";
186
+
enable=mkEnableOption''
187
+
C# language support.
188
+
189
+
::: {.note}
190
+
This feature will not work if the .NET SDK is not installed.
191
+
Both `roslyn` and `csharp_ls` require the .NET SDK 10 to work properly with Razor.
192
+
Using the most recent SDK version is strongly recommended.
193
+
:::
194
+
195
+
:::{.tip}
196
+
There is a way to avoid always specifying _dotnet-sdk_10_ inside devshells, even when a project targets _dotnet-sdk_8_. You can achieve this by adding the following **Lua** configuration to your **NVF** setup (for example, via `luaConfigRC`):
This configuration overrides only the first argument of the Roslyn LSP command (the `dotnet` executable), replacing it with a `dotnet` binary built from a combined package that includes SDK versions 10, 9, and 8. Additional SDK versions can be added if needed.
212
+
213
+
This approach is not a perfect solution. You may encounter issues if your project requires a specific patch version (for example, `8.0.433`) but the combined package only provides an earlier version (such as `8.0.300`). While this usually does not cause major problems, it is something to be aware of when using this setup.
214
+
:::
215
+
216
+
::: {.warning}
217
+
At the moment, only `roslyn` provides full Razor support.
0 commit comments