Neovim plugin to automatically adjust git env vars when syncing dotfiles using the "bare git repo" method

Compare changes

Choose any two refs to compare.

Changed files
+64 -8
.github
workflows
doc
lua
baredot
-1
.github/workflows/ci.yml
···
- uses: googleapis/release-please-action@v4
with:
release-type: simple
-
package-name: baredot.nvim
+8
CHANGELOG.md
···
+
# Changelog
+
+
## [1.1.0](https://github.com/ejrichards/baredot.nvim/compare/v1.0.0...v1.1.0) (2024-06-17)
+
+
+
### Features
+
+
* Adding "is_enabled" lua function ([9fd8094](https://github.com/ejrichards/baredot.nvim/commit/9fd80946fe0ad6ab5147238751472e023f4a01c4))
+2 -2
README.md
···
## Commands
-
- `:BaredotInfo` - Print current status
-
- `:BaredotToggle` - Manually toggle the env vars on / off
+
- `:Baredot info` - Print current status
+
- `:Baredot toggle` - Manually toggle the env vars on / off
## Functions
+37
cliff.toml
···
+
[changelog]
+
# https://keats.github.io/tera/docs/#introduction
+
body = """
+
{% for group, commits in commits | group_by(attribute="group") %}
+
=== {{ group | striptags | trim | upper_first }}
+
{% for commit in commits %}
+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
+
{% if commit.breaking %}[**breaking**] {% endif %}\
+
{{ commit.message | upper_first }}\
+
{% endfor %}
+
{% endfor %}\n
+
"""
+
# remove the leading and trailing s
+
trim = true
+
+
[git]
+
conventional_commits = true
+
filter_unconventional = true
+
split_commits = false
+
+
# Just things end users will care about
+
commit_parsers = [
+
{ message = "^feat", group = "<!-- 0 -->๐Ÿš€ Features" },
+
{ message = "^fix", group = "<!-- 1 -->๐Ÿ› Bug Fixes" },
+
{ message = "^doc", group = "<!-- 3 -->๐Ÿ“š Documentation" },
+
{ message = "^perf", group = "<!-- 4 -->โšก Performance" },
+
{ message = "^style", group = "<!-- 5 -->๐ŸŽจ Styling" },
+
{ message = "^test", group = "<!-- 6 -->๐Ÿงช Testing" },
+
{ message = "^chore|^ci|^refactor", skip = true },
+
{ body = ".*security", group = "<!-- 8 -->๐Ÿ›ก๏ธ Security" },
+
{ message = "^revert", group = "<!-- 9 -->โ—€๏ธ Revert" },
+
{ message = ".*", group = "<!-- 10 -->๐Ÿ’ผ Other" },
+
]
+
# filter out the commits that are not matched by commit parsers
+
filter_commits = false
+
topo_order = false
+
sort_commits = "oldest"
+3 -3
doc/baredot.nvim.txt
···
-
*baredot.nvim.txt* For Neovim >= 0.9.0 Last change: 2024 June 17
+
*baredot.nvim.txt* For Neovim >= 0.9.0 Last change: 2024 June 18
==============================================================================
Table of Contents *baredot.nvim-table-of-contents*
···
COMMANDS *baredot.nvim-baredot-commands*
-
- `:BaredotInfo` - Print current status
-
- `:BaredotToggle` - Manually toggle the env vars on / off
+
- `:Baredot info` - Print current status
+
- `:Baredot toggle` - Manually toggle the env vars on / off
FUNCTIONS *baredot.nvim-baredot-functions*
+14 -2
lua/baredot/commands.lua
···
function Commands.setup(opt)
options = opt
-
vim.api.nvim_create_user_command("BaredotInfo", Commands.info, { desc = "BaredotInfo" })
-
vim.api.nvim_create_user_command("BaredotToggle", Commands.toggle, { desc = "BaredotToggle" })
+
vim.api.nvim_create_user_command("Baredot", function(args)
+
local cmd = vim.trim(args.args or "")
+
if cmd == "toggle" then
+
Commands.toggle()
+
else
+
Commands.info()
+
end
+
end, {
+
desc = "Baredot",
+
nargs = "?",
+
complete = function()
+
return { "info", "toggle" }
+
end
+
})
end
return Commands