Skip to content

d7omdev/nuget.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NuGet Plugin for Neovim

2024-08-08-at-00-09-36.png This Neovim plugin allows you to manage NuGet packages within your .NET projects using Telescope for an interactive interface. It provides two main commands: NuGetInstall and NuGetRemove.

  • NuGetInstall: Searches for a package with the provided search term, displays the results in Telescope with package details, and allows you to select a package version to install.
  • NuGetRemove: Removes a package from the installed packages in the .NET project.

Requirements

Installation

Using lazy.nvim

If telescope.nvim and plenary.nvim are not already installed:

-- init.lua:
{
  "d7omdev/nuget.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-telescope/telescope.nvim",
  },
  config = function()
    require("nuget").setup()
  end,
}

-- or plugins/nuget.lua
return {
  "d7omdev/nuget.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-telescope/telescope.nvim",
  },
  config = function()
    require("nuget").setup()
  end,
}

If telescope.nvim and plenary.nvim are already installed:

{
  "d7omdev/nuget.nvim",
  config = function()
    require("nuget").setup()
  end,
}

Usage

Commands

  • :NuGetInstall - Search and install a NuGet package.
  • :NuGetRemove - Remove an installed NuGet package.

Keymaps

Default keymaps are provided but can be overridden in the setup function.

  • <leader>ni - Install a NuGet package.
  • <leader>nr - Remove a NuGet package.

Configuration

The nuget.nvim plugin provides default keymaps for common operations but allows customization or disabling of these keymaps based on user preferences. Here are the details:

Disabling Keymaps

To disable the default keymaps, you can pass an empty table to the keys option in the setup function:

require("nuget").setup({
    keys = {}
})

This will ensure no keymaps are set by the plugin.

Custom Keymaps

You can also provide your custom keymaps by passing them to the keys option:

require("nuget").setup({
    keys = {
     -- action = {"mode", "mapping"}
        install = { "n", "<leader>pi" },
        remove = { "n", "<leader>pr" },
    }
})

This will override the default keymaps with the ones you provide.

Contribution

If you want to contribute to this project, feel free to submit a pull request. If you find any bugs or have suggestions for improvements, please open an issue. All contributions are welcome!