A Neovim plugin for interacting with the dotnet CLI, written in Lua.
- Run and build .NET projects.
- Create new .NET projects and files from templates.
- Deal with project references
- Run tests
{
"InfiniteFightingGhost/dotnet-dev.nvim",
}The plugin provides a single command that opens a menu for all available actions:
:DotnetDevYou can also map this to a keybinding in your init.lua or init.vim:
vim.keymap.set("n", "<leader>ow", "<cmd>DotnetDev<cr>", { desc = "Open the dotnet dev menu" })The menu allows you to:
- Run project: Executes
dotnet runin the project's root directory. - Build project: Executes
dotnet buildin the project's root directory. - New file: Creates a new C# file with a basic class structure.
- New project: Creates a new .NET project from a template in a specified directory.
- Add project: Adds a new .NET project from a template to the current solution.
- Test project: Run all tests in the current project (Note: you have to have open the specific test project, running it from the main project won't work)
- Add project reference: Add a reference to another project
- Remove project reference: Remove a reference to another project
- Clean project: Runs dotnet clean in the current project
The plugin comes with the following default configuration. You can override these values by passing a table to the setup function.
require('dotnet-dev').setup({
defaultProjectDirectory = "~/Projects",
})