Skip to content

sajjathossain/nvim-monorepos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nvim Monorepos

this is a simple file picker. it finds all the files matching a specific pattern of files in your sub directories and lists them using telescope.nvim. when selected any of the files, it will open the file in the current buffer.

Install

  • lazy
{
  "sajjathossain/nvim-monorepos",
  dependencies = {
    "nvim-telescope/telescope.nvim"
  },
  cmd = {
    "FindFilesInAProject",
    "FindInFilesInAProject"
  },
  config = true
}

or

{
  "sajjathossain/nvim-monorepos",
  dependencies = {
    "nvim-telescope/telescope.nvim"
  },
  cmd = {
    "FindFilesInAProject",
    "FindInFilesInAProject"
  },
  config = function()
    require("nvim-monorepos").setup()
  end
}

available methods

  • find files
require("nvim-monorepos").find_files()
  • find in files
require("nvim-monorepos").find_in_files()

available commands

  • find files in project
FindFilesInAProject
  • find in files in project
FindInFilesInAProject

Default config

  • patterns
{
    files = { "project.json", "package.json" }, -- Replace with your file patterns
    ignore = { ".git", "node_modules", "build" },
}

Note: Pass a table of files, or ignore to update the pattern. files are the ones that the system will search for and list only the directories that has the file in its root. And the ignore patterns will be ignored from listing.