Skip to content

Small minibuffer enhancement for navigating monorepos

Notifications You must be signed in to change notification settings

flocks/monobuffer.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Monobuffer.el

Small minibuffer enhancement for navigating monorepos.

Overview

Monobuffer.el provides a single minibuffer function that allows to navigate through the different packages in a monorepo. This function works incrementally, allowing to progressively explore the structure of the monorepo.

  • If the current path is deep inside a subproject, it will insert the root path of this subproject
  • If the current path is already the root path of the subproject, it will insert the root directory path
  • If the current path is already the root directory path, it will offer a completion to jump to any subprojects.
~/Projects/monorepo/packages/my-subpackage/folder/folder2/file.ts ->  
~/Projects/monorepo/packages/my-subpackage ->
~/Projects/monorepo ->
-- completion for all subprojects -- 

https://github.com/flocks/monobuffer.el/raw/master/monobuffer.gif

Customization

Bind monorepo to a key in minibuffer-mode-map.

(define-key minibuffer-mode-map (kbd "M-u") 'monorepo)
variabledescriptiondefault
monobuffer–root-folder-regexRegex representing the pattern to find the root directory“.git\\|.project”
monobuffer–subproject-regexRegex representing the pattern to find all subprojects“package.json”
monobuffer–exclude-folder-regexRegex representing the folders to excludes while searching for all subprojects“node_modules”

Todos

  • exclude root directory from (monobuffer--get-all-subprojects)
  • in (monobuffer) ensure the current buffer is the minibuffer and the content is a path

About

Small minibuffer enhancement for navigating monorepos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published