Compare commits

..

6 commits

Author SHA1 Message Date
b3124eb582
nvim: Change nvim tree to neotree plugin 2024-09-19 10:07:57 +02:00
11d6a08bcc
vcs: Set default diff editor
Using neovim 'hunk.nvim' plugin
2024-09-19 10:07:32 +02:00
bfb4fadee0
vcs: Add aliases for jj 2024-09-19 10:07:04 +02:00
bcd93eb237
vcs: Restructure vcs module
Just like writing and qutebrowser modules, restructured the version
control software module to make more use of dotter's ability to
precisely link files. All contained programs have a top-level directory
and all the files that correspond to that specific software lie beneath
in the directory tree.
2024-09-18 17:38:44 +02:00
0b6f0c235d
vcs: Add jujutsu config file 2024-09-18 17:28:13 +02:00
4aec6b9ba3
vcs: Rename from git to support multiple vcs 2024-09-18 17:25:12 +02:00
10 changed files with 68 additions and 13 deletions

View file

@ -4,7 +4,7 @@
# a development environment based on git and nvim.
[base]
depends = ["shell", "git", "nvim", "scripts", "ssh", "terminal", "bootstrap"]
depends = ["shell", "vcs", "nvim", "scripts", "ssh", "terminal", "bootstrap"]
[bootstrap.files]
"bootstrap/dotlink.sh" = "~/.config/sh/alias.d/dotlink.sh"
@ -13,9 +13,13 @@ depends = ["shell", "git", "nvim", "scripts", "ssh", "terminal", "bootstrap"]
"sh/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
sh = "~"
[git.files]
"git/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
git = "~"
[vcs.files]
"vcs/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
"vcs/git" = "~/.config"
"vcs/jj" = "~/.config"
"vcs/gitignore/config" = "~/.config"
"vcs/gitignore/local" = "~/.local"
vcs = "~"
[nvim.files]
"nvim/.config/nvim/spell/de.utf-8.add.spl" = { target = "~/.config/nvim/spell/de.utf-8.add.spl", type = "symbolic" }

View file

@ -15,13 +15,20 @@ return {
event = { "BufEnter" },
}, -- integrate file manager
{
"nvim-tree/nvim-tree.lua", -- integrate file tree
config = true,
dependencies = { "nvim-tree/nvim-web-devicons", config = true },
cmd = "NvimTreeToggle",
keys = {
{ "<leader>se", "<cmd>NvimTreeToggle<cr>", desc = "filetree", silent = true },
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
{ "nvim-tree/nvim-web-devicons", optional = true },
},
cmd = "Neotree",
opts = {
source_selector = { winbar = true },
},
keys = {
{ "<leader>se", "<cmd>Neotree toggle left<cr>", desc = "filetree", silent = true },
},
lazy = false
},
{ "MagicDuck/grug-far.nvim", lazy = false, opts = {} },
-- fuzzy matching picker

View file

@ -1,15 +1,17 @@
# Git module
# Version control software module
[git](https://git-scm.com/) - a distributed version control system
[jujutsu](https://martinvonz.github.io/jj/latest/) - a change-based version control system
## What's in this module
[[_TOC_]]
## Global git settings
## Global vcs settings
This is probably the first thing that needs to be customized, since it points to a different identity for each git user.
This are probably the first things that need to be customized, since it points to a different identity for each git user.
I sign all my commits by default, so take out the corresponding lines if you don't, or exchange it with your gpg key.
Similarly for jujutsu, change the identity and remove the lines concerning gpg signing if you don't use it.
Git will rewrite any remotes using http(s) to use the ssh notation for pushes to github and gitlab so that, even if you set up the repository using an https url you can utilize your usual ssh key for pushing.

12
vcs/jj/jj/config.toml Normal file
View file

@ -0,0 +1,12 @@
[user]
email = "marty.oehme@gmail.com"
name = "Marty Oehme"
[signing]
sign-all = true
backend = "gpg"
key = "73BA40D5AFAF49C9"
[ui]
default-command = "log"
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]

30
vcs/jj/sh/alias.d/jj.sh Normal file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env sh
if ! exist jj; then
return 1
fi
alias j='jj' # necessary for a thing as easy to type?
if exist lazyjj; then
alias lj="lazyjj"
fi
alias js="jj status"
alias jd="jj describe"
alias jn="jj new"
alias jc="jj commit"
alias jl='jj log'
alias jlo='jj log --summary'
alias jloo='jj log --patch'
alias jo="jj op log"
alias jss="jj squash"
alias jsi="jj squash --interactive"
alias je="jj edit"
alias jee="jj next --edit"
alias jun="jj undo"
alias jp="jj git push"