Skip to content

cantti/dotnet-helper.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dotnet-helper.nvim

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.

Installation:

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,
    },
  },
},

New C# file

The plugin can insert C# class when entering an empty C# file.

Commands

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.

Templates (snippets)

-- 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 templates

Fix namespace for buffer

require("dotnet-helper").fix_ns_buf()
:Dotnet ns

Fix namespace for directory

require("dotnet-helper").fix_ns_dir()
:Dotnet ns --dir

Edit Secrets

require("dotnet-helper").secrets_edit()
:Dotnet secrets

List Secrets

require("dotnet-helper").secrets_list()
:Dotnet secrets --list

Search and install nuget package

require("dotnet-helper").nuget_search()
:Dotnet nuget

EF Core migrations actions

Supported actions: add, remove list.

require("dotnet-helper").migrations()
:Dotnet migrations

Plans

  • Add dotnet new support for common projects
  • Add basic dotnet sln support

Alternatives and similar plugins

About

Collection of lightweight commands and utilities for .NET development.

Topics

Resources

Stars

Watchers

Forks

Languages