Skip to content

Change directory to project folder when using telescope and restore afterwards

License

Notifications You must be signed in to change notification settings

desdic/telescope-rooter.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

telescope-rooter

What is telescope-rooter

telescope-rooter.nvim is a extension for the telescope neovim plugin. telescope-rooter.nvim changes the working directory to the to the project/root path before the TelescopePrompt is started and restores the working directory to the previous once closed.

Requirements

This plugins requires telescope.nvim

Installation

Using Lazy as dependency for telescope

dependencies = {
	...
	{"desdic/telescope-rooter.nvim"}
	...
}

Enabling in telescope

require "telescope".load_extension("rooter")

Default configuration

require("telescope").extensions = {
    rooter = {
       enable = true,
       patterns = { ".git" }
    }
}

Note that if one of the patterns are not found it will not change the current working directory

Usage

telescope-rooter.nvim can be enabled/disabled using :Telescope rooter toggle

TODO

  • automatic testing via github

About

Change directory to project folder when using telescope and restore afterwards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages