Neovim plugin to automatically adjust
git env vars when syncing dotfiles using the "bare git repo" method
1*baredot.nvim.txt* For Neovim >= 0.9.0 Last change: 2024 June 18
2
3==============================================================================
4Table of Contents *baredot.nvim-table-of-contents*
5
61. Baredot |baredot.nvim-baredot|
7 - Details |baredot.nvim-baredot-details|
8 - Setup |baredot.nvim-baredot-setup|
9 - Configuration |baredot.nvim-baredot-configuration|
10 - Commands |baredot.nvim-baredot-commands|
11 - Functions |baredot.nvim-baredot-functions|
12
13==============================================================================
141. Baredot *baredot.nvim-baredot*
15
16This is a Neovim plugin to automatically adjust `git` env vars when syncing
17dotfiles using the "bare git repo" method:
18
19Dotfiles: Best way to store in a bare git repository
20<https://www.atlassian.com/git/tutorials/dotfiles>
21
22
23DETAILS *baredot.nvim-baredot-details*
24
25When launching and when changing directory (eg. `:cd`), the plugin will detect
26if the current directory is in a git repo by searching for a `.git` folder.
27
28- If a `.git` folder is found, the env vars are cleared and `git` will work as normal.
29- If a `.git` folder is not found, and we are in `$HOME`, the env vars will be adjusted to use the
30 bare git repo. This will let other git plugins function using that repo.
31
32
33SETUP *baredot.nvim-baredot-setup*
34
35lazy.nvim
36
37>lua
38 {
39 "ejrichards/baredot.nvim",
40 opts = {
41 git_dir = "~/.cfg" -- Change this path
42 }
43 }
44<
45
46
47CONFIGURATION *baredot.nvim-baredot-configuration*
48
49>lua
50 {
51 -- These two options set the GIT_DIR and GIT_WORK_TREE env vars
52 -- They are expanded using "vim.fn.expand"
53 git_dir = "~/.cfg",
54 git_work_tree = "~",
55 -- Filename pattern to find that will disable Baredot
56 disable_pattern = "%.git"
57 }
58<
59
60
61COMMANDS *baredot.nvim-baredot-commands*
62
63- `:Baredot info` - Print current status
64- `:Baredot toggle` - Manually toggle the env vars on / off
65
66
67FUNCTIONS *baredot.nvim-baredot-functions*
68
69- `require("baredot").info()` - Print current status
70- `require("baredot").is_enabled()` - Returns current status as boolean
71- `require("baredot").toggle()` - Manually toggle the env vars on / off
72- `require("baredot").set(boolean)` - Set the env vars on / off
73
74Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
75
76vim:tw=78:ts=8:noet:ft=help:norl: