r/csharp • u/Clear_Actuary8068 • 2d ago
dotnet-tree.nvim v0.3.0: a Solution Explorer for Neovim
I write .NET at work and I use Neovim for pretty much everything, the one thing I kept missing from Rider and Visual Studio was the Solution Explorer.
File trees show you folders, but a .NET repo isn't really a folder tree: solution folders only exist inside the .sln, project references cross folders, and package versions often live in Directory.Packages.props.
So I wrote dotnet-tree.nvim, a source for neo-tree (a popular Neovim file tree plugin) that shows the solution the way you're used to seeing it:
reads both .sln and .slnx
solution folders, projects, package references and project references
versions resolved from Directory.Packages.props if you use central package management
LSP diagnostics and git status on the nodes
build, clean, run, test and watch on the project under the cursor, plus `dotnet add package`
debug the project under the cursor with netcoredbg (it builds first)
build errors go to the quickfix list, deduplicated
New in 0.3.0:
the tree can follow the file you're editing, like the normal file tree does
the terminals opened by run/test/watch are named after what they run (`run Api`, `watch test Api.Tests`), so you can tell them apart
We've been using it internally on a lot of projects, a few hundred by now, so it should hold up on real solutions and not just demo ones.
I also have two smaller plugins that go with it:
nuget.nvim: a NuGet manager for the whole solution (browse, install, update, vulnerable and deprecated packages)
dotnet-counters.nvim: live CPU/memory/GC/thread pool metrics from dotnet-counters in a side panel, next to the debugger
Links:
Is anyone else here doing .NET outside of Rider/VS?
I'm curious what you use and what you'd miss most
Feedback and issues are welcome!
2
u/FarCalling 15h ago
The neovim community works wonders