dotnet-helper.nvim provides a collection of lightweight commands and utilities for .NET development in Neovim. It’s designed to complement the standard LSP workflow — adding only the essential features missing from a typical Neovim + LSP configuration.
Using lazy:
{
"cantti/dotnet-helper.nvim",
-- default config
opts = {
-- create autocommands to insert c# class when enterin an empty C# file
autocommands = {
enabled = true,
-- use block {} namespace for new files
use_block_ns = false,
},
-- create :Dotnet ... user commands
-- if not enabled lua api can be used
usercommands = {
enabled = true,
-- use block {} namespace for templates
use_block_ns = false,
},
},
},
The plugin can insert C# class when entering an empty C# file.
This plugin offers a collection of helper functions implemented with Neovim’s Lua API.
Many of them are also accessible via user commands under the :Dotnet namespace.
-- choose template from picker
require("dotnet-helper").templates()
-- individual templates
require("dotnet-helper").templates_class()
require("dotnet-helper").templates_api_controller()
require("dotnet-helper").templates_method():Dotnet templatesrequire("dotnet-helper").fix_ns_buf():Dotnet nsrequire("dotnet-helper").fix_ns_dir():Dotnet ns --dirrequire("dotnet-helper").secrets_edit():Dotnet secretsrequire("dotnet-helper").secrets_list():Dotnet secrets --listrequire("dotnet-helper").nuget_search():Dotnet nugetSupported actions: add, remove list.
require("dotnet-helper").migrations():Dotnet migrations- Add
dotnet newsupport for common projects - Add basic
dotnet slnsupport