Custom Telescope Picker for Chez Moi Managed Dot Files!
Also adds neovim commands to:
-
add -
forget -
're-add'
- Chezmoi does not overwrite template files and neither will this command
-
updatechezmoi's source
All that is needed is to install the plugin and load the telescope extension via require("telescope").load_extension("chezmoi").
Here is an example with Lazy:
{
"nvim-telescope/telescope.nvim",
dependencies = {
{ "GianniBYoung/chezmoi-telescope.nvim" },
},
config = function()
require("telescope").load_extension("chezmoi")
end,
}-
:Telescope chezmoi dotfiles-> Open telescope picker populated with Chezmoi managed dot files- This opens the file in chezmoi's source dir
-
:Telescope chezmoi dotfiles liveDots=true-> Open telescope picker populated with (Live) Chezmoi managed dot files- This opens the actual dotfile on your system
-
:ChezmoiAdd->addthe current file to Chezmoi -
:ChezmoiReAdd->re-addthe current file to Chezmoi -
:ChezmoiRemove->removethe current file from Chezmoi -
:ChezmoiUpdate-> Pull down the remote source
The available options are:
iconsbool(true) - Enable or disable iconsliveDotsbool(false) - Populate the picker with the actual dotfiles your system is using - aka 'live dot files'
Options can be set in the following ways:
-
:Telescope chezmoi dotfiles option1=value1 option2=bool2 -
require('telescope').extensions.chezmoi.dotfiles({option1="value1", option2=bool2})
This plugin provides a custom picker for telescope that populates results with files from $CHEZMOI_SOURCE_DIR and opens the result in a new buffer on selection.
-
Better icons in picker
-
Better error handling
If this plugin is missing functionality for your use case please open an issue or submit a PR!