Compare commits

...

9 commits

8 changed files with 38 additions and 18 deletions

4
.gitignore vendored
View file

@ -4,8 +4,10 @@
.git/ .git/
config.sh config.sh
config/containers
config/git/gitk config/git/gitk
config/iterm2
config/zsh/.zcompcache config/zsh/.zcompcache
config/zsh/.zcompdump config/zsh/.zcompdump
config/zsh/.zsh_sessions config/zsh/.zsh_sessions
config/iterm2

View file

@ -9,11 +9,7 @@ error() {
[ -n "$1" ] || error "input file missing" [ -n "$1" ] || error "input file missing"
[ -r "$1" ] || error "can't read input file" [ -r "$1" ] || error "can't read input file"
# shellcheck disable=SC2016 # I don't want $(tty) to be expanded
printf '#!/bin/sh printf '#!/bin/sh
GPG_TTY=$(tty) openssl enc -d -aes256 -pbkdf2 -base64 <<EOF
export GPG_TTY
base64 -d <<EOF | gpg -d
%s %s
EOF EOF' "$(openssl enc -aes256 -pbkdf2 -base64 -in "$1")"
' "$(gpg -c --cipher-algo AES256 -o - -- "$1" | base64)"

View file

@ -20,7 +20,7 @@
[pretty] [pretty]
basic = %C(auto)%h%d %s %C(8) %ad basic = %C(auto)%h%d %s %C(8) %ad
name = %C(auto)%h%d %s %n%C(2)%aN <%C(10)%aE%C(2)> %C(8) %ad %n name = %C(auto)%h%d %s %C(2)%aN <%C(10)%aE%C(2)> %C(8) %ad
[core] [core]
excludesfile = ~/.config/git/ignore excludesfile = ~/.config/git/ignore

View file

@ -2,13 +2,23 @@ local M = {}
M.setup = function() M.setup = function()
vim.filetype.add { vim.filetype.add {
-- 1. The file path/name is checked first.
filename = {
["clang-format"] = "yaml",
editorconfig = "editorconfig",
},
-- 2. Patterns are checked second.
pattern = { pattern = {
["${HOME}/.ssh/config.d/.*"] = "sshconfig", ["${HOME}/.ssh/config.d/.*"] = "sshconfig",
[".*/ssh/config"] = "sshconfig",
-- Files in my dotfiles repository.
[".*/config/zsh/.*"] = "zsh",
[".*/git/config"] = "gitconfig", [".*/git/config"] = "gitconfig",
[".*gitconfig"] = "gitconfig", [".*/ssh/config"] = "sshconfig",
[".*/home/editorconfig"] = "editorconfig", },
[".*config/zsh/.*"] = "zsh", -- 3. Finally, the extension is checked.
extension = {
gitconfig = "gitconfig",
}, },
} }
end end

View file

@ -23,6 +23,9 @@ local pickers = setmetatable({
no_ignore = true, no_ignore = true,
no_ignore_parent = true, no_ignore_parent = true,
}), }),
all_man_pages = builtin_picker("man_pages", {
sections = { "ALL" },
}),
colorscheme = builtin_picker("colorscheme", { enable_preview = true }), colorscheme = builtin_picker("colorscheme", { enable_preview = true }),
diagnostics = builtin_picker("diagnostics", { bufnr = 0 }), diagnostics = builtin_picker("diagnostics", { bufnr = 0 }),
dotfiles = builtin_picker("find_files", { cwd = "~/.dotfiles", hidden = true }), dotfiles = builtin_picker("find_files", { cwd = "~/.dotfiles", hidden = true }),
@ -77,7 +80,7 @@ return {
{ lhs"k", pickers.keymaps " Keymaps" , desc = desc("[k]eymaps") }, { lhs"k", pickers.keymaps " Keymaps" , desc = desc("[k]eymaps") },
{ lhs"K", pickers.help_tags " Help tags" , desc = desc("[K] help/documentation") }, { lhs"K", pickers.help_tags " Help tags" , desc = desc("[K] help/documentation") },
{ lhs"l", pickers.loclist " Location list" , desc = desc("[l]ocation List") }, { lhs"l", pickers.loclist " Location list" , desc = desc("[l]ocation List") },
{ lhs"m", pickers.man_pages " Man pages" , desc = desc("[m]an pages") }, { lhs"m", pickers.all_man_pages " Man pages" , desc = desc("[m]an pages") },
--lhs"n" used in vim-notify --lhs"n" used in vim-notify
{ lhs"o", pickers.vim_options " Vim options" , desc = desc("[o]ptions") }, { lhs"o", pickers.vim_options " Vim options" , desc = desc("[o]ptions") },
--lhs"p" --lhs"p"

View file

@ -105,3 +105,7 @@ PRs
Florian Florian
Kurzarbeit Kurzarbeit
StateSmith StateSmith
Ardia
Chromeleon
eluent
fluidics

View file

@ -1,3 +1,8 @@
fs_setup_shell_options() {
setopt INTERACTIVE_COMMENTS # Allow comments in interactive use.
set -o noclobber
}
fs_setup_terminal() { fs_setup_terminal() {
# Make ctrl-q and ctrl-s available to terminal applications. # Make ctrl-q and ctrl-s available to terminal applications.
stty start undef stop undef stty start undef stop undef
@ -538,7 +543,7 @@ fs_setup_local_config() {
# Set up zsh for interactive use (options, prompt, aliases, etc.) # Set up zsh for interactive use (options, prompt, aliases, etc.)
fs_setup_zsh_interactive() { fs_setup_zsh_interactive() {
setopt INTERACTIVE_COMMENTS # Allow comments in interactive use. fs_setup_shell_options
fs_setup_terminal fs_setup_terminal
fs_setup_aliases fs_setup_aliases
fs_setup_completion fs_setup_completion

View file

@ -1,18 +1,18 @@
BasedOnStyle: Google
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignArrayOfStructures: Right AlignAfterOpenBracket: BlockIndent
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true AlignConsecutiveBitFields: true
AlignConsecutiveMacros: true AlignConsecutiveMacros: true
AllowShortBlocksOnASingleLine: Empty AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline AllowShortFunctionsOnASingleLine: Inline
BasedOnStyle: Google
BinPackArguments: false BinPackArguments: false
BinPackParameters: false BinPackParameters: false
# BreakBeforeBinaryOperators: NonAssignment # TODO: enable on clang-format v20 # BreakBeforeBinaryOperators: NonAssignment # TODO: enable on clang-format v20
BreakBeforeBraces: WebKit BreakBeforeBraces: WebKit
BreakBinaryOperations: OnePerLine # BreakBinaryOperations: OnePerLine # TODO: enable on clang-format v20
BreakConstructorInitializers: BeforeComma BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma BreakInheritanceList: BeforeComma
ContinuationIndentWidth: 8 ContinuationIndentWidth: 8