-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d52afce
commit 18cad60
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
*baredot.nvim.txt* For Neovim >= 0.9.0 Last change: 2024 June 17 | ||
|
||
============================================================================== | ||
Table of Contents *baredot.nvim-table-of-contents* | ||
|
||
1. Baredot |baredot.nvim-baredot| | ||
- Details |baredot.nvim-baredot-details| | ||
- Setup |baredot.nvim-baredot-setup| | ||
- Configuration |baredot.nvim-baredot-configuration| | ||
- Commands |baredot.nvim-baredot-commands| | ||
- Functions |baredot.nvim-baredot-functions| | ||
|
||
============================================================================== | ||
1. Baredot *baredot.nvim-baredot* | ||
|
||
This is a Neovim plugin to automatically adjust `git` env vars when syncing | ||
dotfiles using the "bare git repo" method: | ||
|
||
Dotfiles: Best way to store in a bare git repository | ||
<https://www.atlassian.com/git/tutorials/dotfiles> | ||
|
||
|
||
DETAILS *baredot.nvim-baredot-details* | ||
|
||
When launching and when changing directory (eg. `:cd`), the plugin will detect | ||
if the current directory is in a git repo by searching for a `.git` folder. | ||
|
||
- If a `.git` folder is found, the env vars are cleared and `git` will work as normal. | ||
- If a `.git` folder is not found, and we are in `$HOME`, the env vars will be adjusted to use the | ||
bare git repo. This will let other git plugins function using that repo. | ||
|
||
|
||
SETUP *baredot.nvim-baredot-setup* | ||
|
||
lazy.nvim | ||
|
||
>lua | ||
{ | ||
"ejrichards/baredot.nvim", | ||
opts = { | ||
git_dir = "~/.cfg" -- Change this path | ||
} | ||
} | ||
< | ||
|
||
|
||
CONFIGURATION *baredot.nvim-baredot-configuration* | ||
|
||
>lua | ||
{ | ||
-- These two options set the GIT_DIR and GIT_WORK_TREE env vars | ||
-- They are expanded using "vim.fn.expand" | ||
git_dir = "~/.cfg", | ||
git_work_tree = "~", | ||
-- Filename pattern to find that will disable Baredot | ||
disable_pattern = "%.git" | ||
} | ||
< | ||
|
||
|
||
COMMANDS *baredot.nvim-baredot-commands* | ||
|
||
- `:BaredotInfo` - Print current status | ||
- `:BaredotToggle` - Manually toggle the env vars on / off | ||
|
||
|
||
FUNCTIONS *baredot.nvim-baredot-functions* | ||
|
||
- `require("baredot").info()` - Print current status | ||
- `require("baredot").toggle()` - Manually toggle the env vars on / off | ||
- `require("baredot").set(boolean)` - Set the env vars on / off | ||
|
||
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc> | ||
|
||
vim:tw=78:ts=8:noet:ft=help:norl: |