Neovim plugin that adds a handy popup menu for running ng generate commands in Angular projects.
ng-generate.mp4
- folke/snacks.nvim support
- nvim-neo-tree/neo-tree.nvim support
- Popup menu for all
ng generatecommands - Automatically detects path relative to
src/app - Supports additional command-line options
- Works with
npx ng g ...out of the box - Automatically refreshes file explorer after generation
{
{ "harlamenko/ng-generate.nvim" },
{
"folke/snacks.nvim",
opts = {
picker = {
sources = {
explorer = {
actions = {
ng_generate = function(picker, item)
require("ng-generate").run_snacks(picker, item)
end,
},
win = {
list = {
keys = {
["n"] = "ng_generate",
},
},
},
},
},
},
},
},
}{
{ "harlamenko/ng-generate.nvim" },
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
window = {
mappings = {
["n"] = function(state) require("ng-generate").run_neotree(state) end,
},
}
},
},
}- Open Snacks Explorer or Neotree
- Select the desired directory inside
src/app - Press
n - Press symbol the desired Angular entity or place cursor on it and press
Enterto generate (component, service, module, etc.) - Enter a name and any additional options
:NgGenerateOptionally pass a directory:
:NgGenerate src/app/path/to/dir