astrocommunity icon indicating copy to clipboard operation
astrocommunity copied to clipboard

.NET Multi Solution Detection

Open ghernandezmsft opened this issue 4 months ago • 8 comments

Checklist

  • [x] I have searched through the AstroNvim documentation
  • [x] I have searched through the existing issues of this project
  • [x] I have searched the existing issues of plugins related to this issue
  • [x] I can replicate the bug with the minimal repro.lua provided below

Neovim version (nvim -v)

v0.11.3

Operating system/version

Windows

Terminal/GUI

PowerShell

Describe the bug

I have been trying to use .NET with AstroNvim. It's very laggy and projects aren't being detected. I've tried using all plugins out there and there's no luck. I get the same bugs as mentioned. Typically I work in big repos and I used Roslyn as well to configure .NET. Is there anything that will be help me use AstroNvim with .NET smoothly or is there a nice alternative that uses vim? My productivity has not gone well thus far using .NET and AstroNnvim.

Expected behavior

All solutions should be detected. I should be able to jump from one file in a separate solution to another and still have the same behavior.

Screenshots

Detects here: Image

Jump to another file in seperate sln (no detection/everything breaks):

Image

Additional Context

No response

Minimal configuration

User.lua:

---@type LazySpec
return {

  -- == Examples of Adding Plugins ==
  
{
    "seblyng/roslyn.nvim",
    ft = "cs",
    opts = {
      roslyn_path = "C:\\Users\\gihernandez\\AppData\\Local\\nvim\\roslyn-lsp\\Microsoft.CodeAnalysis.LanguageServer.4.8.0-3.23451.1.zip\\lib\\net7.0\\Microsoft.CodeAnalysis.LanguageServer.dll",
      filewatching = "auto",
      broad_search = true,
      lock_target = false,
    },
    config = function(_, opts)
      require("roslyn").setup(opts)
    end,
  },

ghernandezmsft avatar Aug 08 '25 00:08 ghernandezmsft

have you tried the c-sharp pack? @ghernandezmsft

Uzaaft avatar Aug 08 '25 12:08 Uzaaft

This doesn’t appear to be related to any AstroCommunity packs.

From the roslyn.nvim documentation

If you have multiple solutions, this plugin tries to guess which one to use. You can change the target with the :Roslyn target command.

So multi-solution support is not provided by the plugin itself — it only picks one solution and lets you switch targets manually.

ahmtsen avatar Aug 20 '25 06:08 ahmtsen

You can use the cs or cs-omnisharp packs provided by AstroCommunity instead. Even though im not sure if underlying lsp's have multi solution support.

ahmtsen avatar Aug 20 '25 06:08 ahmtsen

Seems like easy-dotnet.nvim as mentioned in #1638 would help with this. Not sure about the compatibility of it with other plugins.

Uzaaft avatar Sep 09 '25 20:09 Uzaaft

hi wasn't sure if easy dotnet helps with this or not. just should mention easy dotnet has other tools as well, which should be considered when deciding to add it or not

amirreza8002 avatar Sep 09 '25 20:09 amirreza8002

I think it looks promising @amirreza8002. Now its up to the community to add it in(or one of the maintainers if/when they feel like doing it)

Uzaaft avatar Sep 11 '25 13:09 Uzaaft

if i can create time, i will create a cs-roslyn pack with roslyn as underlying lsp, and integrate easy-dotnet.nvim with existing cs packs also.

ahmtsen avatar Sep 12 '25 07:09 ahmtsen

the basic setup is rather easy to do but i couldn't get snacks and blink integration to work, not sure if it's an error on my side or a general problem, otherwise i'd pack it myself

amirreza8002 avatar Sep 12 '25 07:09 amirreza8002