Skip to content

A simple Neovim plugin to quickly switch between Angular component files (TypeScript, HTML, stylesheets, and spec files) with custom commands.

License

Notifications You must be signed in to change notification settings

grantwforsythe/ng-switch.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng-switch.nvim

A simple Neovim plugin to quickly switch between Angular component files (TypeScript, HTML, stylesheets, and spec files) with custom commands.

Inspired by infinity1207/angular2-switcher

Features

  • Jump between .ts, .html, .spec.ts, and style files (.scss, .css, .sass, .less) for Angular components.
  • Optionally open target files in a vertical split.
  • Customizable style file extensions and split behavior.

Installation

Use your favorite plugin manager. For example, with lazy.nvim:

{
  "grantwforsythe/ng-switch.nvim",
  -- defaults
  opts = {
      is_vsplit = false, -- Set to true to open files in a vertical split
      style_formats = { "scss", "css", "sass", "less" }, -- Order of style extensions to check
  },
  keys = {
    { "<leader>nh", "<cmd>NgSwitchHTML<CR>", desc = "Switch to HTML file" },
    { "<leader>nt", "<cmd>NgSwitchTS<CR>", desc = "Switch to TypeScript file" },
    { "<leader>ns", "<cmd>NgSwitchSpec<CR>", desc = "Switch to Spec file" },
    { "<leader>nc", "<cmd>NgSwitchCSS<CR>", desc = "Switch to Style file" },
  }
}

About

A simple Neovim plugin to quickly switch between Angular component files (TypeScript, HTML, stylesheets, and spec files) with custom commands.

Topics

Resources

License

Stars

Watchers

Forks

Languages