diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-08-12 09:19:03 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-08-12 09:19:03 +0200 |
| commit | 6e5882a2fd02d30206ab9ca8aa5847b8ea09196c (patch) | |
| tree | 75d3b91f9005e51b93a37b44f3ad23ce4f48bc35 | |
| parent | 41c676453cd32fac760ff26e092c9dc81874739f (diff) | |
| download | dotfiles-6e5882a2fd02d30206ab9ca8aa5847b8ea09196c.tar.gz dotfiles-6e5882a2fd02d30206ab9ca8aa5847b8ea09196c.tar.bz2 dotfiles-6e5882a2fd02d30206ab9ca8aa5847b8ea09196c.zip | |
Normalize line endings
47 files changed, 2316 insertions, 2316 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | newsboat/urls | 1 | newsboat/urls |
| 2 | nvim/lazy-lock.json | 2 | nvim/lazy-lock.json |
| 3 | ncmpcpp/error.log | 3 | ncmpcpp/error.log |
| 4 | 4 | ||
diff --git a/X11/xinitrc b/X11/xinitrc index df199eb..befe2fe 100644 --- a/X11/xinitrc +++ b/X11/xinitrc | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | export LANG=de_DE.UTF-8 | 3 | export LANG=de_DE.UTF-8 |
| 4 | export LC_ALL=de_DE.UTF-8 | 4 | export LC_ALL=de_DE.UTF-8 |
| 5 | 5 | ||
| 6 | # Start Xfce | 6 | # Start Xfce |
| 7 | exec /usr/local/etc/xdg/xfce4/xinitrc | 7 | exec /usr/local/etc/xdg/xfce4/xinitrc |
diff --git a/abook/abookrc b/abook/abookrc index 5ce4cb3..4c5bcff 100644 --- a/abook/abookrc +++ b/abook/abookrc | |||
| @@ -1,19 +1,19 @@ | |||
| 1 | # vim: filetype=dosini | 1 | # vim: filetype=dosini |
| 2 | 2 | ||
| 3 | set use_mouse=true | 3 | set use_mouse=true |
| 4 | set show_all_emails=true | 4 | set show_all_emails=true |
| 5 | set sort_field=nick | 5 | set sort_field=nick |
| 6 | set address_style=eu | 6 | set address_style=eu |
| 7 | set use_ascii_only=false | 7 | set use_ascii_only=false |
| 8 | set add_email_prevent_duplicates=false | 8 | set add_email_prevent_duplicates=false |
| 9 | set index_format="{name:32} │ {email:40} │ {phone:-20} │ {workphone:-20|mobile}" | 9 | set index_format="{name:32} │ {email:40} │ {phone:-20} │ {workphone:-20|mobile}" |
| 10 | 10 | ||
| 11 | set use_colors=true | 11 | set use_colors=true |
| 12 | set color_header_fg=black | 12 | set color_header_fg=black |
| 13 | set color_header_bg=white | 13 | set color_header_bg=white |
| 14 | set color_footer_fg=black | 14 | set color_footer_fg=black |
| 15 | set color_footer_bg=white | 15 | set color_footer_bg=white |
| 16 | set color_list_header_fg=white | 16 | set color_list_header_fg=white |
| 17 | set color_list_header_bg=blue | 17 | set color_list_header_bg=blue |
| 18 | set color_list_even_fg=grey | 18 | set color_list_even_fg=grey |
| 19 | set color_list_odd_fg=yellow | 19 | set color_list_odd_fg=yellow |
diff --git a/bootstrap-win/git.ps1 b/bootstrap-win/git.ps1 index 6accba4..8d63338 100644 --- a/bootstrap-win/git.ps1 +++ b/bootstrap-win/git.ps1 | |||
| @@ -1,75 +1,75 @@ | |||
| 1 | #Requires -Version 5.1 | 1 | #Requires -Version 5.1 |
| 2 | <# | 2 | <# |
| 3 | Installiert Git und delta (Pager fuer git/config) per winget. | 3 | Installiert Git und delta (Pager fuer git/config) per winget. |
| 4 | 4 | ||
| 5 | Aufruf (keine Admin-Rechte noetig): | 5 | Aufruf (keine Admin-Rechte noetig): |
| 6 | .\bootstrap-win\git.ps1 | 6 | .\bootstrap-win\git.ps1 |
| 7 | #> | 7 | #> |
| 8 | 8 | ||
| 9 | $ErrorActionPreference = "Stop" | 9 | $ErrorActionPreference = "Stop" |
| 10 | $script:Failures = @() | 10 | $script:Failures = @() |
| 11 | 11 | ||
| 12 | function Write-Ok($msg) { | 12 | function Write-Ok($msg) { |
| 13 | Write-Host "OK $msg" -ForegroundColor Green | 13 | Write-Host "OK $msg" -ForegroundColor Green |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | function Write-Step($msg) { | 16 | function Write-Step($msg) { |
| 17 | Write-Host "==> $msg" -ForegroundColor Cyan | 17 | Write-Host "==> $msg" -ForegroundColor Cyan |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | function Write-Skip($msg) { | 20 | function Write-Skip($msg) { |
| 21 | Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray | 21 | Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | function Write-Warn($msg) { | 24 | function Write-Warn($msg) { |
| 25 | Write-Host "! $msg" -ForegroundColor Yellow | 25 | Write-Host "! $msg" -ForegroundColor Yellow |
| 26 | $script:Failures += $msg | 26 | $script:Failures += $msg |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | function Test-CommandExists([string]$Name) { | 29 | function Test-CommandExists([string]$Name) { |
| 30 | return [bool](Get-Command $Name -ErrorAction SilentlyContinue) | 30 | return [bool](Get-Command $Name -ErrorAction SilentlyContinue) |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | function Install-WingetPackage([string]$Binary, [string]$Id) { | 33 | function Install-WingetPackage([string]$Binary, [string]$Id) { |
| 34 | if (Test-CommandExists $Binary) { | 34 | if (Test-CommandExists $Binary) { |
| 35 | Write-Skip $Binary | 35 | Write-Skip $Binary |
| 36 | return | 36 | return |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | Write-Step "winget install $Id" | 39 | Write-Step "winget install $Id" |
| 40 | $output = winget install --id $Id -e --source winget --accept-package-agreements --accept-source-agreements --silent 2>&1 | 40 | $output = winget install --id $Id -e --source winget --accept-package-agreements --accept-source-agreements --silent 2>&1 |
| 41 | 41 | ||
| 42 | if ($LASTEXITCODE -ne 0) { | 42 | if ($LASTEXITCODE -ne 0) { |
| 43 | $lastLine = ($output | Select-Object -Last 3) -join " / " | 43 | $lastLine = ($output | Select-Object -Last 3) -join " / " |
| 44 | Write-Warn "winget install $Id fehlgeschlagen (Binary '$Binary' nicht gefunden): $lastLine -- Pruefen mit: winget search $Id" | 44 | Write-Warn "winget install $Id fehlgeschlagen (Binary '$Binary' nicht gefunden): $lastLine -- Pruefen mit: winget search $Id" |
| 45 | return | 45 | return |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | Write-Ok $Id | 48 | Write-Ok $Id |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | function Test-Prerequisites { | 51 | function Test-Prerequisites { |
| 52 | if (-not (Test-CommandExists "winget")) { | 52 | if (-not (Test-CommandExists "winget")) { |
| 53 | Write-Host "Fehler: winget wurde nicht gefunden. 'App Installer' aus dem Microsoft Store installieren." -ForegroundColor Red | 53 | Write-Host "Fehler: winget wurde nicht gefunden. 'App Installer' aus dem Microsoft Store installieren." -ForegroundColor Red |
| 54 | exit 1 | 54 | exit 1 |
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | function Main { | 58 | function Main { |
| 59 | Test-Prerequisites | 59 | Test-Prerequisites |
| 60 | 60 | ||
| 61 | Install-WingetPackage -Binary "git" -Id "Git.Git" | 61 | Install-WingetPackage -Binary "git" -Id "Git.Git" |
| 62 | Install-WingetPackage -Binary "delta" -Id "dandavison.delta" | 62 | Install-WingetPackage -Binary "delta" -Id "dandavison.delta" |
| 63 | 63 | ||
| 64 | Write-Host "" | 64 | Write-Host "" |
| 65 | if ($script:Failures.Count -eq 0) { | 65 | if ($script:Failures.Count -eq 0) { |
| 66 | Write-Host "Git-Bootstrap abgeschlossen." -ForegroundColor Green | 66 | Write-Host "Git-Bootstrap abgeschlossen." -ForegroundColor Green |
| 67 | } else { | 67 | } else { |
| 68 | Write-Host "Git-Bootstrap abgeschlossen, mit $($script:Failures.Count) Warnung(en):" -ForegroundColor Yellow | 68 | Write-Host "Git-Bootstrap abgeschlossen, mit $($script:Failures.Count) Warnung(en):" -ForegroundColor Yellow |
| 69 | foreach ($f in $script:Failures) { | 69 | foreach ($f in $script:Failures) { |
| 70 | Write-Host " - $f" -ForegroundColor Yellow | 70 | Write-Host " - $f" -ForegroundColor Yellow |
| 71 | } | 71 | } |
| 72 | } | 72 | } |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | Main | 75 | Main |
diff --git a/bootstrap-win/neovim-dict.ps1 b/bootstrap-win/neovim-dict.ps1 index 5aeb117..0068a5e 100644 --- a/bootstrap-win/neovim-dict.ps1 +++ b/bootstrap-win/neovim-dict.ps1 | |||
| @@ -1,58 +1,58 @@ | |||
| 1 | #Requires -Version 5.1 | 1 | #Requires -Version 5.1 |
| 2 | <# | 2 | <# |
| 3 | Windows-natives Pendant zu bootstrap/neovim-dict.sh. | 3 | Windows-natives Pendant zu bootstrap/neovim-dict.sh. |
| 4 | Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter. | 4 | Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter. |
| 5 | 5 | ||
| 6 | Aufruf: | 6 | Aufruf: |
| 7 | .\bootstrap-win\neovim-dict.ps1 | 7 | .\bootstrap-win\neovim-dict.ps1 |
| 8 | #> | 8 | #> |
| 9 | 9 | ||
| 10 | $ErrorActionPreference = "Stop" | 10 | $ErrorActionPreference = "Stop" |
| 11 | 11 | ||
| 12 | function Write-Ok($msg) { | 12 | function Write-Ok($msg) { |
| 13 | Write-Host "OK $msg" -ForegroundColor Green | 13 | Write-Host "OK $msg" -ForegroundColor Green |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | function Write-Step($msg) { | 16 | function Write-Step($msg) { |
| 17 | Write-Host "==> $msg" -ForegroundColor Cyan | 17 | Write-Host "==> $msg" -ForegroundColor Cyan |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | function Write-SkipMsg($msg) { | 20 | function Write-SkipMsg($msg) { |
| 21 | Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray | 21 | Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | $SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell" | 24 | $SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell" |
| 25 | 25 | ||
| 26 | $Urls = @( | 26 | $Urls = @( |
| 27 | "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl", | 27 | "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl", |
| 28 | "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" | 28 | "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" |
| 29 | ) | 29 | ) |
| 30 | 30 | ||
| 31 | function Get-SpellFile([string]$Url) { | 31 | function Get-SpellFile([string]$Url) { |
| 32 | $fileName = Split-Path -Leaf $Url | 32 | $fileName = Split-Path -Leaf $Url |
| 33 | $dest = Join-Path $SpellDir $fileName | 33 | $dest = Join-Path $SpellDir $fileName |
| 34 | 34 | ||
| 35 | if (Test-Path $dest) { | 35 | if (Test-Path $dest) { |
| 36 | Write-SkipMsg $fileName | 36 | Write-SkipMsg $fileName |
| 37 | return | 37 | return |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | Write-Step "Lade $fileName herunter" | 40 | Write-Step "Lade $fileName herunter" |
| 41 | Invoke-WebRequest -Uri $Url -OutFile $dest | 41 | Invoke-WebRequest -Uri $Url -OutFile $dest |
| 42 | Write-Ok $fileName | 42 | Write-Ok $fileName |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | function Main { | 45 | function Main { |
| 46 | if (-not (Test-Path $SpellDir)) { | 46 | if (-not (Test-Path $SpellDir)) { |
| 47 | New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null | 47 | New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | foreach ($url in $Urls) { | 50 | foreach ($url in $Urls) { |
| 51 | Get-SpellFile $url | 51 | Get-SpellFile $url |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | Write-Host "" | 54 | Write-Host "" |
| 55 | Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green | 55 | Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | Main | 58 | Main |
diff --git a/bootstrap/git.sh b/bootstrap/git.sh index b4f285f..e782cad 100755 --- a/bootstrap/git.sh +++ b/bootstrap/git.sh | |||
| @@ -1,78 +1,78 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | set -eu | 3 | set -eu |
| 4 | 4 | ||
| 5 | OS="$(uname -s)" | 5 | OS="$(uname -s)" |
| 6 | 6 | ||
| 7 | die() { | 7 | die() { |
| 8 | printf 'Fehler: %s\n' "$*" >&2 | 8 | printf 'Fehler: %s\n' "$*" >&2 |
| 9 | exit 1 | 9 | exit 1 |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | have() { | 12 | have() { |
| 13 | command -v "$1" >/dev/null 2>&1 | 13 | command -v "$1" >/dev/null 2>&1 |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | check_prerequisites() { | 16 | check_prerequisites() { |
| 17 | case "$OS" in | 17 | case "$OS" in |
| 18 | Darwin) | 18 | Darwin) |
| 19 | if ! have brew; then | 19 | if ! have brew; then |
| 20 | die "Homebrew ist nicht installiert." | 20 | die "Homebrew ist nicht installiert." |
| 21 | fi | 21 | fi |
| 22 | ;; | 22 | ;; |
| 23 | FreeBSD) | 23 | FreeBSD) |
| 24 | if ! have doas; then | 24 | if ! have doas; then |
| 25 | die "doas ist nicht installiert." | 25 | die "doas ist nicht installiert." |
| 26 | fi | 26 | fi |
| 27 | ;; | 27 | ;; |
| 28 | *) | 28 | *) |
| 29 | die "Nicht unterstütztes Betriebssystem: $OS" | 29 | die "Nicht unterstütztes Betriebssystem: $OS" |
| 30 | ;; | 30 | ;; |
| 31 | esac | 31 | esac |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | setup_homebrew_env() { | 34 | setup_homebrew_env() { |
| 35 | case "$OS" in | 35 | case "$OS" in |
| 36 | Darwin) | 36 | Darwin) |
| 37 | export HOMEBREW_NO_AUTO_UPDATE=1 | 37 | export HOMEBREW_NO_AUTO_UPDATE=1 |
| 38 | export HOMEBREW_NO_INSTALL_CLEANUP=1 | 38 | export HOMEBREW_NO_INSTALL_CLEANUP=1 |
| 39 | ;; | 39 | ;; |
| 40 | esac | 40 | esac |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | install_pkg() { | 43 | install_pkg() { |
| 44 | binary="$1" | 44 | binary="$1" |
| 45 | package="$2" | 45 | package="$2" |
| 46 | 46 | ||
| 47 | if have "$binary"; then | 47 | if have "$binary"; then |
| 48 | printf "✓ %-32s vorhanden\n" "$binary" | 48 | printf "✓ %-32s vorhanden\n" "$binary" |
| 49 | return | 49 | return |
| 50 | fi | 50 | fi |
| 51 | 51 | ||
| 52 | printf "→ Installiere %s\n" "$package" | 52 | printf "→ Installiere %s\n" "$package" |
| 53 | 53 | ||
| 54 | case "$OS" in | 54 | case "$OS" in |
| 55 | Darwin) | 55 | Darwin) |
| 56 | brew install "$package" | 56 | brew install "$package" |
| 57 | ;; | 57 | ;; |
| 58 | FreeBSD) | 58 | FreeBSD) |
| 59 | doas pkg install -y "$package" | 59 | doas pkg install -y "$package" |
| 60 | ;; | 60 | ;; |
| 61 | esac | 61 | esac |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | install_prerequisites() { | 64 | install_prerequisites() { |
| 65 | install_pkg git git | 65 | install_pkg git git |
| 66 | install_pkg delta git-delta | 66 | install_pkg delta git-delta |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | main() { | 69 | main() { |
| 70 | check_prerequisites | 70 | check_prerequisites |
| 71 | setup_homebrew_env | 71 | setup_homebrew_env |
| 72 | 72 | ||
| 73 | install_prerequisites | 73 | install_prerequisites |
| 74 | 74 | ||
| 75 | printf "\nGit-Bootstrap abgeschlossen.\n" | 75 | printf "\nGit-Bootstrap abgeschlossen.\n" |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | main "$@" | 78 | main "$@" |
diff --git a/bootstrap/neovim-dict.sh b/bootstrap/neovim-dict.sh index 77a7db8..ee51db7 100755 --- a/bootstrap/neovim-dict.sh +++ b/bootstrap/neovim-dict.sh | |||
| @@ -1,44 +1,44 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | set -eu | 2 | set -eu |
| 3 | 3 | ||
| 4 | SPELL_DIR="$HOME/.local/share/nvim/site/spell" | 4 | SPELL_DIR="$HOME/.local/share/nvim/site/spell" |
| 5 | mkdir -p "$SPELL_DIR" | 5 | mkdir -p "$SPELL_DIR" |
| 6 | 6 | ||
| 7 | cd "$SPELL_DIR" | 7 | cd "$SPELL_DIR" |
| 8 | 8 | ||
| 9 | die() { | 9 | die() { |
| 10 | printf 'Fehler: %s\n' "$*" >&2 | 10 | printf 'Fehler: %s\n' "$*" >&2 |
| 11 | exit 1 | 11 | exit 1 |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | have() { | 14 | have() { |
| 15 | command -v "$1" >/dev/null 2>&1 | 15 | command -v "$1" >/dev/null 2>&1 |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | download() { | 18 | download() { |
| 19 | url="$1" | 19 | url="$1" |
| 20 | file=$(basename "$url") | 20 | file=$(basename "$url") |
| 21 | 21 | ||
| 22 | if [ -f "$file" ]; then | 22 | if [ -f "$file" ]; then |
| 23 | printf "✓ %-32s vorhanden\n" "$file" | 23 | printf "✓ %-32s vorhanden\n" "$file" |
| 24 | return | 24 | return |
| 25 | fi | 25 | fi |
| 26 | 26 | ||
| 27 | printf "→ Lade %s herunter\n" "$file" | 27 | printf "→ Lade %s herunter\n" "$file" |
| 28 | if have wget; then | 28 | if have wget; then |
| 29 | wget -q --show-progress "$url" | 29 | wget -q --show-progress "$url" |
| 30 | elif have curl; then | 30 | elif have curl; then |
| 31 | curl -fLO "$url" | 31 | curl -fLO "$url" |
| 32 | else | 32 | else |
| 33 | die "weder wget noch curl gefunden" | 33 | die "weder wget noch curl gefunden" |
| 34 | fi | 34 | fi |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | main() { | 37 | main() { |
| 38 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" | 38 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" |
| 39 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" | 39 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" |
| 40 | 40 | ||
| 41 | printf "\nWörterbücher für Neovim installiert!\n" | 41 | printf "\nWörterbücher für Neovim installiert!\n" |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | main "$@" | 44 | main "$@" |
diff --git a/bootstrap/neovim.sh b/bootstrap/neovim.sh index 158de80..475853a 100755 --- a/bootstrap/neovim.sh +++ b/bootstrap/neovim.sh | |||
| @@ -1,171 +1,171 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | set -eu | 3 | set -eu |
| 4 | 4 | ||
| 5 | OS="$(uname -s)" | 5 | OS="$(uname -s)" |
| 6 | 6 | ||
| 7 | die() { | 7 | die() { |
| 8 | printf 'Fehler: %s\n' "$*" >&2 | 8 | printf 'Fehler: %s\n' "$*" >&2 |
| 9 | exit 1 | 9 | exit 1 |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | have() { | 12 | have() { |
| 13 | command -v "$1" >/dev/null 2>&1 | 13 | command -v "$1" >/dev/null 2>&1 |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | check_prerequisites() { | 16 | check_prerequisites() { |
| 17 | case "$OS" in | 17 | case "$OS" in |
| 18 | Darwin) | 18 | Darwin) |
| 19 | if ! have brew; then | 19 | if ! have brew; then |
| 20 | die "Homebrew ist nicht installiert." | 20 | die "Homebrew ist nicht installiert." |
| 21 | fi | 21 | fi |
| 22 | ;; | 22 | ;; |
| 23 | FreeBSD) | 23 | FreeBSD) |
| 24 | if ! have doas; then | 24 | if ! have doas; then |
| 25 | die "doas ist nicht installiert." | 25 | die "doas ist nicht installiert." |
| 26 | fi | 26 | fi |
| 27 | ;; | 27 | ;; |
| 28 | *) | 28 | *) |
| 29 | die "Nicht unterstütztes Betriebssystem: $OS" | 29 | die "Nicht unterstütztes Betriebssystem: $OS" |
| 30 | ;; | 30 | ;; |
| 31 | esac | 31 | esac |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | setup_homebrew_env() { | 34 | setup_homebrew_env() { |
| 35 | case "$OS" in | 35 | case "$OS" in |
| 36 | Darwin) | 36 | Darwin) |
| 37 | export HOMEBREW_NO_AUTO_UPDATE=1 | 37 | export HOMEBREW_NO_AUTO_UPDATE=1 |
| 38 | export HOMEBREW_NO_INSTALL_CLEANUP=1 | 38 | export HOMEBREW_NO_INSTALL_CLEANUP=1 |
| 39 | ;; | 39 | ;; |
| 40 | esac | 40 | esac |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | install_pkg() { | 43 | install_pkg() { |
| 44 | binary="$1" | 44 | binary="$1" |
| 45 | package="$2" | 45 | package="$2" |
| 46 | 46 | ||
| 47 | if have "$binary"; then | 47 | if have "$binary"; then |
| 48 | printf "✓ %-32s vorhanden\n" "$binary" | 48 | printf "✓ %-32s vorhanden\n" "$binary" |
| 49 | return | 49 | return |
| 50 | fi | 50 | fi |
| 51 | 51 | ||
| 52 | printf "→ Installiere %s\n" "$package" | 52 | printf "→ Installiere %s\n" "$package" |
| 53 | 53 | ||
| 54 | case "$OS" in | 54 | case "$OS" in |
| 55 | Darwin) | 55 | Darwin) |
| 56 | brew install "$package" | 56 | brew install "$package" |
| 57 | ;; | 57 | ;; |
| 58 | FreeBSD) | 58 | FreeBSD) |
| 59 | doas pkg install -y "$package" | 59 | doas pkg install -y "$package" |
| 60 | ;; | 60 | ;; |
| 61 | esac | 61 | esac |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | install_npm() { | 64 | install_npm() { |
| 65 | binary="$1" | 65 | binary="$1" |
| 66 | package="$2" | 66 | package="$2" |
| 67 | 67 | ||
| 68 | if have "$binary"; then | 68 | if have "$binary"; then |
| 69 | printf "✓ %-32s vorhanden\n" "$binary" | 69 | printf "✓ %-32s vorhanden\n" "$binary" |
| 70 | return | 70 | return |
| 71 | fi | 71 | fi |
| 72 | 72 | ||
| 73 | if ! have npm; then | 73 | if ! have npm; then |
| 74 | die "npm wurde nicht gefunden." | 74 | die "npm wurde nicht gefunden." |
| 75 | fi | 75 | fi |
| 76 | 76 | ||
| 77 | printf "→ Installiere npm-Paket %s\n" "$package" | 77 | printf "→ Installiere npm-Paket %s\n" "$package" |
| 78 | npm install -g "$package" | 78 | npm install -g "$package" |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | install_prerequisites() { | 81 | install_prerequisites() { |
| 82 | install_pkg curl curl | 82 | install_pkg curl curl |
| 83 | install_pkg git git | 83 | install_pkg git git |
| 84 | install_pkg node node | 84 | install_pkg node node |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | install_formatters() { | 87 | install_formatters() { |
| 88 | install_pkg gawk gawk | 88 | install_pkg gawk gawk |
| 89 | install_pkg jq jq | 89 | install_pkg jq jq |
| 90 | install_npm prettier prettier | 90 | install_npm prettier prettier |
| 91 | install_pkg ruff ruff | 91 | install_pkg ruff ruff |
| 92 | install_pkg shfmt shfmt | 92 | install_pkg shfmt shfmt |
| 93 | install_pkg stylua stylua | 93 | install_pkg stylua stylua |
| 94 | install_pkg yamlfmt yamlfmt | 94 | install_pkg yamlfmt yamlfmt |
| 95 | 95 | ||
| 96 | case "$OS" in | 96 | case "$OS" in |
| 97 | Darwin) | 97 | Darwin) |
| 98 | install_pkg clang-format clang-format | 98 | install_pkg clang-format clang-format |
| 99 | ;; | 99 | ;; |
| 100 | FreeBSD) | 100 | FreeBSD) |
| 101 | install_pkg xmllint libxml2 | 101 | install_pkg xmllint libxml2 |
| 102 | ;; | 102 | ;; |
| 103 | esac | 103 | esac |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | install_tools() { | 106 | install_tools() { |
| 107 | install_pkg rg ripgrep | 107 | install_pkg rg ripgrep |
| 108 | 108 | ||
| 109 | case "$OS" in | 109 | case "$OS" in |
| 110 | Darwin) | 110 | Darwin) |
| 111 | # Ein Clipboard-Tool ist als `pbcopy` bereits als Systemtool unter Macos | 111 | # Ein Clipboard-Tool ist als `pbcopy` bereits als Systemtool unter Macos |
| 112 | # vorinstalliert. | 112 | # vorinstalliert. |
| 113 | install_pkg gmake make | 113 | install_pkg gmake make |
| 114 | install_pkg fd fd | 114 | install_pkg fd fd |
| 115 | install_pkg tree-sitter tree-sitter | 115 | install_pkg tree-sitter tree-sitter |
| 116 | ;; | 116 | ;; |
| 117 | FreeBSD) | 117 | FreeBSD) |
| 118 | install_pkg xclip xclip | 118 | install_pkg xclip xclip |
| 119 | install_pkg gmake gmake | 119 | install_pkg gmake gmake |
| 120 | install_pkg fd fd-find | 120 | install_pkg fd fd-find |
| 121 | install_pkg tree-sitter tree-sitter-cli | 121 | install_pkg tree-sitter tree-sitter-cli |
| 122 | ;; | 122 | ;; |
| 123 | esac | 123 | esac |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | install_lsp() { | 126 | install_lsp() { |
| 127 | install_npm basedpyright-langserver basedpyright | 127 | install_npm basedpyright-langserver basedpyright |
| 128 | install_npm bash-language-server bash-language-server | 128 | install_npm bash-language-server bash-language-server |
| 129 | 129 | ||
| 130 | case "$OS" in | 130 | case "$OS" in |
| 131 | Darwin) | 131 | Darwin) |
| 132 | install_pkg shellcheck shellcheck | 132 | install_pkg shellcheck shellcheck |
| 133 | ;; | 133 | ;; |
| 134 | FreeBSD) | 134 | FreeBSD) |
| 135 | install_pkg shellcheck hs-ShellCheck | 135 | install_pkg shellcheck hs-ShellCheck |
| 136 | ;; | 136 | ;; |
| 137 | esac | 137 | esac |
| 138 | 138 | ||
| 139 | install_pkg clangd llvm | 139 | install_pkg clangd llvm |
| 140 | install_npm vscode-html-language-server vscode-langservers-extracted | 140 | install_npm vscode-html-language-server vscode-langservers-extracted |
| 141 | install_npm vscode-json-language-server vscode-langservers-extracted | 141 | install_npm vscode-json-language-server vscode-langservers-extracted |
| 142 | install_pkg lua-language-server lua-language-server | 142 | install_pkg lua-language-server lua-language-server |
| 143 | install_npm prisma-language-server @prisma/language-server | 143 | install_npm prisma-language-server @prisma/language-server |
| 144 | install_npm vtsls @vtsls/language-server | 144 | install_npm vtsls @vtsls/language-server |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | install_analysis() { | 147 | install_analysis() { |
| 148 | # sonar-scanner wird direkt von nvim/lua/config/usercmds.lua (:SonarScan) | 148 | # sonar-scanner wird direkt von nvim/lua/config/usercmds.lua (:SonarScan) |
| 149 | # und nvim/scripts/sonarqube.sh (:SonarIssues) genutzt. Nur beruflich | 149 | # und nvim/scripts/sonarqube.sh (:SonarIssues) genutzt. Nur beruflich |
| 150 | # unter macOS im Einsatz, deshalb kein FreeBSD-Zweig. | 150 | # unter macOS im Einsatz, deshalb kein FreeBSD-Zweig. |
| 151 | case "$OS" in | 151 | case "$OS" in |
| 152 | Darwin) | 152 | Darwin) |
| 153 | install_pkg sonar-scanner sonar-scanner | 153 | install_pkg sonar-scanner sonar-scanner |
| 154 | ;; | 154 | ;; |
| 155 | esac | 155 | esac |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | main() { | 158 | main() { |
| 159 | check_prerequisites | 159 | check_prerequisites |
| 160 | setup_homebrew_env | 160 | setup_homebrew_env |
| 161 | 161 | ||
| 162 | install_prerequisites | 162 | install_prerequisites |
| 163 | install_formatters | 163 | install_formatters |
| 164 | install_tools | 164 | install_tools |
| 165 | install_lsp | 165 | install_lsp |
| 166 | install_analysis | 166 | install_analysis |
| 167 | 167 | ||
| 168 | printf "\nNeovim-Bootstrap abgeschlossen.\n" | 168 | printf "\nNeovim-Bootstrap abgeschlossen.\n" |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | main "$@" | 171 | main "$@" |
diff --git a/bootstrap/zsh.sh b/bootstrap/zsh.sh index 0be7ff3..8cea3b6 100755 --- a/bootstrap/zsh.sh +++ b/bootstrap/zsh.sh | |||
| @@ -1,133 +1,133 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | set -eu | 3 | set -eu |
| 4 | 4 | ||
| 5 | OS="$(uname -s)" | 5 | OS="$(uname -s)" |
| 6 | 6 | ||
| 7 | die() { | 7 | die() { |
| 8 | printf 'Fehler: %s\n' "$*" >&2 | 8 | printf 'Fehler: %s\n' "$*" >&2 |
| 9 | exit 1 | 9 | exit 1 |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | have() { | 12 | have() { |
| 13 | command -v "$1" >/dev/null 2>&1 | 13 | command -v "$1" >/dev/null 2>&1 |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | check_prerequisites() { | 16 | check_prerequisites() { |
| 17 | case "$OS" in | 17 | case "$OS" in |
| 18 | Darwin) | 18 | Darwin) |
| 19 | if ! have brew; then | 19 | if ! have brew; then |
| 20 | die "Homebrew ist nicht installiert." | 20 | die "Homebrew ist nicht installiert." |
| 21 | fi | 21 | fi |
| 22 | ;; | 22 | ;; |
| 23 | FreeBSD) | 23 | FreeBSD) |
| 24 | if ! have doas; then | 24 | if ! have doas; then |
| 25 | die "doas ist nicht installiert." | 25 | die "doas ist nicht installiert." |
| 26 | fi | 26 | fi |
| 27 | ;; | 27 | ;; |
| 28 | *) | 28 | *) |
| 29 | die "Nicht unterstütztes Betriebssystem: $OS" | 29 | die "Nicht unterstütztes Betriebssystem: $OS" |
| 30 | ;; | 30 | ;; |
| 31 | esac | 31 | esac |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | setup_homebrew_env() { | 34 | setup_homebrew_env() { |
| 35 | case "$OS" in | 35 | case "$OS" in |
| 36 | Darwin) | 36 | Darwin) |
| 37 | export HOMEBREW_NO_AUTO_UPDATE=1 | 37 | export HOMEBREW_NO_AUTO_UPDATE=1 |
| 38 | export HOMEBREW_NO_INSTALL_CLEANUP=1 | 38 | export HOMEBREW_NO_INSTALL_CLEANUP=1 |
| 39 | ;; | 39 | ;; |
| 40 | esac | 40 | esac |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | install_pkg() { | 43 | install_pkg() { |
| 44 | binary="$1" | 44 | binary="$1" |
| 45 | package="$2" | 45 | package="$2" |
| 46 | 46 | ||
| 47 | if have "$binary"; then | 47 | if have "$binary"; then |
| 48 | printf "✓ %-32s vorhanden\n" "$binary" | 48 | printf "✓ %-32s vorhanden\n" "$binary" |
| 49 | return | 49 | return |
| 50 | fi | 50 | fi |
| 51 | 51 | ||
| 52 | printf "→ Installiere %s\n" "$package" | 52 | printf "→ Installiere %s\n" "$package" |
| 53 | 53 | ||
| 54 | case "$OS" in | 54 | case "$OS" in |
| 55 | Darwin) | 55 | Darwin) |
| 56 | brew install "$package" | 56 | brew install "$package" |
| 57 | ;; | 57 | ;; |
| 58 | FreeBSD) | 58 | FreeBSD) |
| 59 | doas pkg install -y "$package" | 59 | doas pkg install -y "$package" |
| 60 | ;; | 60 | ;; |
| 61 | esac | 61 | esac |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | install_prerequisites() { | 64 | install_prerequisites() { |
| 65 | install_pkg zsh zsh | 65 | install_pkg zsh zsh |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | install_plugin() { | 68 | install_plugin() { |
| 69 | # zsh-syntax-highlighting/zsh-autosuggestions haben kein eigenes Binary, | 69 | # zsh-syntax-highlighting/zsh-autosuggestions haben kein eigenes Binary, |
| 70 | # deshalb Pruefung anhand des von zsh/zshrc gesourceten Pfads. | 70 | # deshalb Pruefung anhand des von zsh/zshrc gesourceten Pfads. |
| 71 | file="$1" | 71 | file="$1" |
| 72 | package="$2" | 72 | package="$2" |
| 73 | 73 | ||
| 74 | if [ -e "$file" ]; then | 74 | if [ -e "$file" ]; then |
| 75 | printf "✓ %-32s vorhanden\n" "$package" | 75 | printf "✓ %-32s vorhanden\n" "$package" |
| 76 | return | 76 | return |
| 77 | fi | 77 | fi |
| 78 | 78 | ||
| 79 | printf "→ Installiere %s\n" "$package" | 79 | printf "→ Installiere %s\n" "$package" |
| 80 | 80 | ||
| 81 | case "$OS" in | 81 | case "$OS" in |
| 82 | Darwin) | 82 | Darwin) |
| 83 | brew install "$package" | 83 | brew install "$package" |
| 84 | ;; | 84 | ;; |
| 85 | FreeBSD) | 85 | FreeBSD) |
| 86 | doas pkg install -y "$package" | 86 | doas pkg install -y "$package" |
| 87 | ;; | 87 | ;; |
| 88 | esac | 88 | esac |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | install_plugins() { | 91 | install_plugins() { |
| 92 | case "$OS" in | 92 | case "$OS" in |
| 93 | Darwin) | 93 | Darwin) |
| 94 | install_plugin "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" zsh-syntax-highlighting | 94 | install_plugin "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" zsh-syntax-highlighting |
| 95 | install_plugin "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" zsh-autosuggestions | 95 | install_plugin "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" zsh-autosuggestions |
| 96 | ;; | 96 | ;; |
| 97 | FreeBSD) | 97 | FreeBSD) |
| 98 | install_plugin "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" zsh-syntax-highlighting | 98 | install_plugin "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" zsh-syntax-highlighting |
| 99 | install_plugin "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" zsh-autosuggestions | 99 | install_plugin "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" zsh-autosuggestions |
| 100 | ;; | 100 | ;; |
| 101 | esac | 101 | esac |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | install_tools() { | 104 | install_tools() { |
| 105 | install_pkg pwgen pwgen | 105 | install_pkg pwgen pwgen |
| 106 | install_pkg mc mc | 106 | install_pkg mc mc |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | set_default_shell() { | 109 | set_default_shell() { |
| 110 | zsh_path="$(command -v zsh)" || die "zsh wurde nicht gefunden." | 110 | zsh_path="$(command -v zsh)" || die "zsh wurde nicht gefunden." |
| 111 | 111 | ||
| 112 | if [ "${SHELL:-}" = "$zsh_path" ]; then | 112 | if [ "${SHELL:-}" = "$zsh_path" ]; then |
| 113 | printf "✓ %-32s bereits Login-Shell\n" "zsh" | 113 | printf "✓ %-32s bereits Login-Shell\n" "zsh" |
| 114 | return | 114 | return |
| 115 | fi | 115 | fi |
| 116 | 116 | ||
| 117 | printf "→ Setze zsh als Login-Shell (chsh)\n" | 117 | printf "→ Setze zsh als Login-Shell (chsh)\n" |
| 118 | chsh -s "$zsh_path" | 118 | chsh -s "$zsh_path" |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | main() { | 121 | main() { |
| 122 | check_prerequisites | 122 | check_prerequisites |
| 123 | setup_homebrew_env | 123 | setup_homebrew_env |
| 124 | 124 | ||
| 125 | install_prerequisites | 125 | install_prerequisites |
| 126 | install_plugins | 126 | install_plugins |
| 127 | install_tools | 127 | install_tools |
| 128 | set_default_shell | 128 | set_default_shell |
| 129 | 129 | ||
| 130 | printf "\nzsh-Bootstrap abgeschlossen.\n" | 130 | printf "\nzsh-Bootstrap abgeschlossen.\n" |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | main "$@" | 133 | main "$@" |
diff --git a/gdb/gdbinit b/gdb/gdbinit index fdccb32..c53ce34 100644 --- a/gdb/gdbinit +++ b/gdb/gdbinit | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | set pagination off | 1 | set pagination off |
| 2 | set history save on | 2 | set history save on |
| 3 | set history expansion on | 3 | set history expansion on |
| 4 | set disassembly-flavor intel | 4 | set disassembly-flavor intel |
| 5 | set tui tab-width 4 | 5 | set tui tab-width 4 |
diff --git a/git/config-up2parts b/git/config-up2parts index 4a3e0a0..f1fef8b 100644 --- a/git/config-up2parts +++ b/git/config-up2parts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ; vim: filetype=gitconfig | 1 | ; vim: filetype=gitconfig |
| 2 | 2 | ||
| 3 | [user] | 3 | [user] |
| 4 | email = thomas.schmucker@up2parts.com | 4 | email = thomas.schmucker@up2parts.com |
| 5 | 5 | ||
diff --git a/install-win.ps1 b/install-win.ps1 index aa77243..bc73e61 100644 --- a/install-win.ps1 +++ b/install-win.ps1 | |||
| @@ -1,113 +1,113 @@ | |||
| 1 | #Requires -Version 5.1 | 1 | #Requires -Version 5.1 |
| 2 | <# | 2 | <# |
| 3 | Windows-natives Pendant zu install.sh - kopiert (statt zu verlinken) die | 3 | Windows-natives Pendant zu install.sh - kopiert (statt zu verlinken) die |
| 4 | relevanten Konfigurationen an ihre nativen Windows-Zielorte. Keine | 4 | relevanten Konfigurationen an ihre nativen Windows-Zielorte. Keine |
| 5 | Admin-Rechte noetig (keine Symlinks). | 5 | Admin-Rechte noetig (keine Symlinks). |
| 6 | 6 | ||
| 7 | Aufruf: | 7 | Aufruf: |
| 8 | .\install-win.ps1 | 8 | .\install-win.ps1 |
| 9 | #> | 9 | #> |
| 10 | 10 | ||
| 11 | $ErrorActionPreference = "Stop" | 11 | $ErrorActionPreference = "Stop" |
| 12 | 12 | ||
| 13 | function Write-Ok($msg) { | 13 | function Write-Ok($msg) { |
| 14 | Write-Host "OK $msg" -ForegroundColor Green | 14 | Write-Host "OK $msg" -ForegroundColor Green |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | function Write-Step($msg) { | 17 | function Write-Step($msg) { |
| 18 | Write-Host "==> $msg" -ForegroundColor Cyan | 18 | Write-Host "==> $msg" -ForegroundColor Cyan |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | function Write-SkipMsg($msg) { | 21 | function Write-SkipMsg($msg) { |
| 22 | Write-Host "- $msg" -ForegroundColor DarkGray | 22 | Write-Host "- $msg" -ForegroundColor DarkGray |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | $RepoRoot = $PSScriptRoot | 25 | $RepoRoot = $PSScriptRoot |
| 26 | 26 | ||
| 27 | $NvimSrc = Join-Path $RepoRoot "nvim" | 27 | $NvimSrc = Join-Path $RepoRoot "nvim" |
| 28 | $NvimDst = Join-Path $env:LOCALAPPDATA "nvim" | 28 | $NvimDst = Join-Path $env:LOCALAPPDATA "nvim" |
| 29 | 29 | ||
| 30 | $GitConfigSrc = Join-Path $RepoRoot "git\config" | 30 | $GitConfigSrc = Join-Path $RepoRoot "git\config" |
| 31 | $GitConfigDst = Join-Path $env:USERPROFILE ".gitconfig" | 31 | $GitConfigDst = Join-Path $env:USERPROFILE ".gitconfig" |
| 32 | 32 | ||
| 33 | $GitUp2partsSrc = Join-Path $RepoRoot "git\config-up2parts" | 33 | $GitUp2partsSrc = Join-Path $RepoRoot "git\config-up2parts" |
| 34 | $GitXdgDir = Join-Path $env:USERPROFILE ".config\git" | 34 | $GitXdgDir = Join-Path $env:USERPROFILE ".config\git" |
| 35 | $GitUp2partsDst = Join-Path $GitXdgDir "config-up2parts" | 35 | $GitUp2partsDst = Join-Path $GitXdgDir "config-up2parts" |
| 36 | 36 | ||
| 37 | $NpmrcSrc = Join-Path $RepoRoot "npm\npmrc" | 37 | $NpmrcSrc = Join-Path $RepoRoot "npm\npmrc" |
| 38 | $NpmrcDst = Join-Path $env:USERPROFILE ".npmrc" | 38 | $NpmrcDst = Join-Path $env:USERPROFILE ".npmrc" |
| 39 | 39 | ||
| 40 | function Copy-NvimConfig { | 40 | function Copy-NvimConfig { |
| 41 | Write-Step "nvim -> $NvimDst" | 41 | Write-Step "nvim -> $NvimDst" |
| 42 | 42 | ||
| 43 | if (Test-Path $NvimDst) { | 43 | if (Test-Path $NvimDst) { |
| 44 | Remove-Item -Recurse -Force $NvimDst | 44 | Remove-Item -Recurse -Force $NvimDst |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | Copy-Item -Recurse -Force $NvimSrc $NvimDst | 47 | Copy-Item -Recurse -Force $NvimSrc $NvimDst |
| 48 | Write-Ok $NvimDst | 48 | Write-Ok $NvimDst |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | function Copy-GitConfig { | 51 | function Copy-GitConfig { |
| 52 | Write-Step "git\config -> $GitConfigDst" | 52 | Write-Step "git\config -> $GitConfigDst" |
| 53 | Copy-Item -Force $GitConfigSrc $GitConfigDst | 53 | Copy-Item -Force $GitConfigSrc $GitConfigDst |
| 54 | Write-Ok $GitConfigDst | 54 | Write-Ok $GitConfigDst |
| 55 | 55 | ||
| 56 | if (-not (Test-Path $GitXdgDir)) { | 56 | if (-not (Test-Path $GitXdgDir)) { |
| 57 | New-Item -ItemType Directory -Path $GitXdgDir -Force | Out-Null | 57 | New-Item -ItemType Directory -Path $GitXdgDir -Force | Out-Null |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | Write-Step "git\config-up2parts -> $GitUp2partsDst" | 60 | Write-Step "git\config-up2parts -> $GitUp2partsDst" |
| 61 | Copy-Item -Force $GitUp2partsSrc $GitUp2partsDst | 61 | Copy-Item -Force $GitUp2partsSrc $GitUp2partsDst |
| 62 | Write-Ok "$GitUp2partsDst (wird per includeIf aus .gitconfig eingebunden)" | 62 | Write-Ok "$GitUp2partsDst (wird per includeIf aus .gitconfig eingebunden)" |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | function Copy-Npmrc { | 65 | function Copy-Npmrc { |
| 66 | if (Test-Path $NpmrcDst) { | 66 | if (Test-Path $NpmrcDst) { |
| 67 | Write-SkipMsg "$NpmrcDst existiert bereits, uebersprungen" | 67 | Write-SkipMsg "$NpmrcDst existiert bereits, uebersprungen" |
| 68 | return | 68 | return |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | # HOME ist unter Windows i.d.R. nicht gesetzt, ${HOME} in npm/npmrc wuerde | 71 | # HOME ist unter Windows i.d.R. nicht gesetzt, ${HOME} in npm/npmrc wuerde |
| 72 | # nicht expandieren - Zeile daher auskommentieren statt zweite npmrc-Datei | 72 | # nicht expandieren - Zeile daher auskommentieren statt zweite npmrc-Datei |
| 73 | # zu pflegen. | 73 | # zu pflegen. |
| 74 | Write-Step "npm\npmrc -> $NpmrcDst (prefix-Zeile auskommentiert)" | 74 | Write-Step "npm\npmrc -> $NpmrcDst (prefix-Zeile auskommentiert)" |
| 75 | $lines = Get-Content -Path $NpmrcSrc | ForEach-Object { | 75 | $lines = Get-Content -Path $NpmrcSrc | ForEach-Object { |
| 76 | if ($_ -match "^\s*prefix\s*=") { | 76 | if ($_ -match "^\s*prefix\s*=") { |
| 77 | "; $_ (unter Windows auskommentiert)" | 77 | "; $_ (unter Windows auskommentiert)" |
| 78 | } else { | 78 | } else { |
| 79 | $_ | 79 | $_ |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | Set-Content -Path $NpmrcDst -Value $lines | 82 | Set-Content -Path $NpmrcDst -Value $lines |
| 83 | Write-Ok $NpmrcDst | 83 | Write-Ok $NpmrcDst |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | function Add-BinToUserPath { | 86 | function Add-BinToUserPath { |
| 87 | $binDir = Join-Path $RepoRoot "windows\bin" | 87 | $binDir = Join-Path $RepoRoot "windows\bin" |
| 88 | $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") | 88 | $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") |
| 89 | $entries = $userPath -split ";" | 89 | $entries = $userPath -split ";" |
| 90 | 90 | ||
| 91 | if ($entries -contains $binDir) { | 91 | if ($entries -contains $binDir) { |
| 92 | Write-SkipMsg "$binDir bereits im User-PATH" | 92 | Write-SkipMsg "$binDir bereits im User-PATH" |
| 93 | return | 93 | return |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | Write-Step "$binDir zum User-PATH hinzufuegen (enthaelt gmake.cmd)" | 96 | Write-Step "$binDir zum User-PATH hinzufuegen (enthaelt gmake.cmd)" |
| 97 | [Environment]::SetEnvironmentVariable("PATH", "$userPath;$binDir", "User") | 97 | [Environment]::SetEnvironmentVariable("PATH", "$userPath;$binDir", "User") |
| 98 | Write-Ok "$binDir (wirkt erst in neuen Terminal-Sitzungen)" | 98 | Write-Ok "$binDir (wirkt erst in neuen Terminal-Sitzungen)" |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | function Main { | 101 | function Main { |
| 102 | Copy-NvimConfig | 102 | Copy-NvimConfig |
| 103 | Copy-GitConfig | 103 | Copy-GitConfig |
| 104 | Copy-Npmrc | 104 | Copy-Npmrc |
| 105 | Add-BinToUserPath | 105 | Add-BinToUserPath |
| 106 | 106 | ||
| 107 | Write-Host "" | 107 | Write-Host "" |
| 108 | Write-Host "Fertig. Dateien wurden KOPIERT, nicht verlinkt." -ForegroundColor Green | 108 | Write-Host "Fertig. Dateien wurden KOPIERT, nicht verlinkt." -ForegroundColor Green |
| 109 | Write-Host "Nach Aenderungen im Repo dieses Skript erneut ausfuehren." | 109 | Write-Host "Nach Aenderungen im Repo dieses Skript erneut ausfuehren." |
| 110 | Write-Host "Neues Terminal oeffnen, damit PATH-Aenderungen wirksam werden." -ForegroundColor Yellow | 110 | Write-Host "Neues Terminal oeffnen, damit PATH-Aenderungen wirksam werden." -ForegroundColor Yellow |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | Main | 113 | Main |
| @@ -1,112 +1,112 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | set -eu | 3 | set -eu |
| 4 | 4 | ||
| 5 | SCRIPT_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | 5 | SCRIPT_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) |
| 6 | 6 | ||
| 7 | CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}" | 7 | CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}" |
| 8 | mkdir -p "$CONFIG" | 8 | mkdir -p "$CONFIG" |
| 9 | 9 | ||
| 10 | link() { | 10 | link() { |
| 11 | src="$1" | 11 | src="$1" |
| 12 | dst="$2" | 12 | dst="$2" |
| 13 | 13 | ||
| 14 | if [ -e "$dst" ] || [ -L "$dst" ]; then | 14 | if [ -e "$dst" ] || [ -L "$dst" ]; then |
| 15 | rm -rf -- "$dst" | 15 | rm -rf -- "$dst" |
| 16 | fi | 16 | fi |
| 17 | 17 | ||
| 18 | ln -sf -- "$src" "$dst" | 18 | ln -sf -- "$src" "$dst" |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | copy_if_missing() { | 21 | copy_if_missing() { |
| 22 | src="$1" | 22 | src="$1" |
| 23 | dst="$2" | 23 | dst="$2" |
| 24 | 24 | ||
| 25 | if [ ! -e "$dst" ] && [ ! -L "$dst" ]; then | 25 | if [ ! -e "$dst" ] && [ ! -L "$dst" ]; then |
| 26 | cp -a -- "$src" "$dst" | 26 | cp -a -- "$src" "$dst" |
| 27 | fi | 27 | fi |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | link_abook() { | 30 | link_abook() { |
| 31 | mkdir -p "$HOME/.abook" | 31 | mkdir -p "$HOME/.abook" |
| 32 | link "$SCRIPT_DIR/abook/abookrc" "$HOME/.abook/abookrc" | 32 | link "$SCRIPT_DIR/abook/abookrc" "$HOME/.abook/abookrc" |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | link_gdb() { | 35 | link_gdb() { |
| 36 | link "$SCRIPT_DIR/gdb" "$CONFIG/gdb" | 36 | link "$SCRIPT_DIR/gdb" "$CONFIG/gdb" |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | link_gitconfig() { | 39 | link_gitconfig() { |
| 40 | link "$SCRIPT_DIR/git" "$CONFIG/git" | 40 | link "$SCRIPT_DIR/git" "$CONFIG/git" |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | link_mpd() { | 43 | link_mpd() { |
| 44 | link "$SCRIPT_DIR/mpd" "$CONFIG/mpd" | 44 | link "$SCRIPT_DIR/mpd" "$CONFIG/mpd" |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | link_ncmpcpp() { | 47 | link_ncmpcpp() { |
| 48 | link "$SCRIPT_DIR/ncmpcpp" "$CONFIG/ncmpcpp" | 48 | link "$SCRIPT_DIR/ncmpcpp" "$CONFIG/ncmpcpp" |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | link_neovim() { | 51 | link_neovim() { |
| 52 | link "$SCRIPT_DIR/nvim" "$CONFIG/nvim" | 52 | link "$SCRIPT_DIR/nvim" "$CONFIG/nvim" |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | link_newsboat() { | 55 | link_newsboat() { |
| 56 | mkdir -p "$CONFIG/newsboat" | 56 | mkdir -p "$CONFIG/newsboat" |
| 57 | link "$SCRIPT_DIR/newsboat/config" "$CONFIG/newsboat/config" | 57 | link "$SCRIPT_DIR/newsboat/config" "$CONFIG/newsboat/config" |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | copy_npmrc() { | 60 | copy_npmrc() { |
| 61 | copy_if_missing "$SCRIPT_DIR/npm/npmrc" "$HOME/.npmrc" | 61 | copy_if_missing "$SCRIPT_DIR/npm/npmrc" "$HOME/.npmrc" |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | link_nexrc() { | 64 | link_nexrc() { |
| 65 | link "$SCRIPT_DIR/nexrc/nexrc" "$HOME/.nexrc" | 65 | link "$SCRIPT_DIR/nexrc/nexrc" "$HOME/.nexrc" |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | link_taskwarrior() { | 68 | link_taskwarrior() { |
| 69 | link "$SCRIPT_DIR/taskwarrior" "$CONFIG/task" | 69 | link "$SCRIPT_DIR/taskwarrior" "$CONFIG/task" |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | link_tmux() { | 72 | link_tmux() { |
| 73 | link "$SCRIPT_DIR/tmux" "$CONFIG/tmux" | 73 | link "$SCRIPT_DIR/tmux" "$CONFIG/tmux" |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | link_vit() { | 76 | link_vit() { |
| 77 | link "$SCRIPT_DIR/vit" "$CONFIG/vit" | 77 | link "$SCRIPT_DIR/vit" "$CONFIG/vit" |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | link_wyrdrc() { | 80 | link_wyrdrc() { |
| 81 | link "$SCRIPT_DIR/wyrd/wyrdrc" "$HOME/.wyrdrc" | 81 | link "$SCRIPT_DIR/wyrd/wyrdrc" "$HOME/.wyrdrc" |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | link_xinitrc() { | 84 | link_xinitrc() { |
| 85 | link "$SCRIPT_DIR/X11/xinitrc" "$HOME/.xinitrc" | 85 | link "$SCRIPT_DIR/X11/xinitrc" "$HOME/.xinitrc" |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | link_zsh() { | 88 | link_zsh() { |
| 89 | link "$SCRIPT_DIR/zsh/zshrc" "$HOME/.zshrc" | 89 | link "$SCRIPT_DIR/zsh/zshrc" "$HOME/.zshrc" |
| 90 | link "$SCRIPT_DIR/zsh/zshenv" "$HOME/.zshenv" | 90 | link "$SCRIPT_DIR/zsh/zshenv" "$HOME/.zshenv" |
| 91 | link "$SCRIPT_DIR/zsh/zprofile" "$HOME/.zprofile" | 91 | link "$SCRIPT_DIR/zsh/zprofile" "$HOME/.zprofile" |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | main() { | 94 | main() { |
| 95 | link_abook | 95 | link_abook |
| 96 | link_gdb | 96 | link_gdb |
| 97 | link_gitconfig | 97 | link_gitconfig |
| 98 | link_mpd | 98 | link_mpd |
| 99 | link_ncmpcpp | 99 | link_ncmpcpp |
| 100 | link_neovim | 100 | link_neovim |
| 101 | link_newsboat | 101 | link_newsboat |
| 102 | copy_npmrc | 102 | copy_npmrc |
| 103 | link_nexrc | 103 | link_nexrc |
| 104 | link_taskwarrior | 104 | link_taskwarrior |
| 105 | link_tmux | 105 | link_tmux |
| 106 | link_vit | 106 | link_vit |
| 107 | link_wyrdrc | 107 | link_wyrdrc |
| 108 | link_xinitrc | 108 | link_xinitrc |
| 109 | link_zsh | 109 | link_zsh |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | main "$@" | 112 | main "$@" |
diff --git a/mpd/mpd.conf b/mpd/mpd.conf index 729156c..6cb95d9 100644 --- a/mpd/mpd.conf +++ b/mpd/mpd.conf | |||
| @@ -1,18 +1,18 @@ | |||
| 1 | music_directory "~/Music" | 1 | music_directory "~/Music" |
| 2 | playlist_directory "~/Music/Playlists" | 2 | playlist_directory "~/Music/Playlists" |
| 3 | bind_to_address "~/.mpd/socket" | 3 | bind_to_address "~/.mpd/socket" |
| 4 | restore_paused "yes" | 4 | restore_paused "yes" |
| 5 | 5 | ||
| 6 | audio_output { | 6 | audio_output { |
| 7 | type "oss" | 7 | type "oss" |
| 8 | name "OSS Output" | 8 | name "OSS Output" |
| 9 | device "/dev/dsp" | 9 | device "/dev/dsp" |
| 10 | mixer_type "hardware" | 10 | mixer_type "hardware" |
| 11 | mixer_device "/dev/mixer" | 11 | mixer_device "/dev/mixer" |
| 12 | mixer_control "PCM" | 12 | mixer_control "PCM" |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | filesystem_charset "UTF-8" | 15 | filesystem_charset "UTF-8" |
| 16 | metadata_to_use "artist,album,title,track,name,genre,date" | 16 | metadata_to_use "artist,album,title,track,name,genre,date" |
| 17 | 17 | ||
| 18 | auto_update "yes" | 18 | auto_update "yes" |
diff --git a/ncmpcpp/config b/ncmpcpp/config index dfe37b1..95ae7bb 100644 --- a/ncmpcpp/config +++ b/ncmpcpp/config | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # vim: filetype=dosini | 1 | # vim: filetype=dosini |
| 2 | 2 | ||
| 3 | mpd_host = "~/.mpd/socket" | 3 | mpd_host = "~/.mpd/socket" |
| 4 | mpd_port = "0" | 4 | mpd_port = "0" |
diff --git a/neovim-windows-setup.md b/neovim-windows-setup.md index c2a4df6..a064a9c 100644 --- a/neovim-windows-setup.md +++ b/neovim-windows-setup.md | |||
| @@ -1,116 +1,116 @@ | |||
| 1 | # Neovim-Setup unter Windows (nativ) | 1 | # Neovim-Setup unter Windows (nativ) |
| 2 | 2 | ||
| 3 | Checkliste für die Übernahme der bestehenden `nvim/`-Config aus dem Dotfiles-Repo auf ein natives Windows-System (kein WSL). Repo selbst bleibt unverändert. | 3 | Checkliste für die Übernahme der bestehenden `nvim/`-Config aus dem Dotfiles-Repo auf ein natives Windows-System (kein WSL). Repo selbst bleibt unverändert. |
| 4 | 4 | ||
| 5 | Alle Windows-Skripte in diesem Repo sind reines PowerShell (kein Git Bash, kein WSL) – mit einer Ausnahme: `windows\bin\gmake.cmd` ist ein trivialer Ein-Zeiler-Wrapper, für den sich eine `.ps1`-Datei nicht lohnt. | 5 | Alle Windows-Skripte in diesem Repo sind reines PowerShell (kein Git Bash, kein WSL) – mit einer Ausnahme: `windows\bin\gmake.cmd` ist ein trivialer Ein-Zeiler-Wrapper, für den sich eine `.ps1`-Datei nicht lohnt. |
| 6 | 6 | ||
| 7 | ## 0. Von Hand zu erledigen (nicht durch Skripte abgedeckt) | 7 | ## 0. Von Hand zu erledigen (nicht durch Skripte abgedeckt) |
| 8 | 8 | ||
| 9 | - **`winget` selbst muss vorhanden sein** ("App Installer" aus dem Microsoft Store) – `bootstrap-win/neovim.ps1` prüft das und bricht mit klarer Meldung ab, kann `winget` aber nicht selbst nachinstallieren. | 9 | - **`winget` selbst muss vorhanden sein** ("App Installer" aus dem Microsoft Store) – `bootstrap-win/neovim.ps1` prüft das und bricht mit klarer Meldung ab, kann `winget` aber nicht selbst nachinstallieren. |
| 10 | - **Nach jedem Skript-Lauf ein neues Terminal öffnen**, bevor `nvim` das erste Mal gestartet wird. PATH-Änderungen (durch winget/npm-Installer oder `install-win.ps1`) landen in der Registry, aber die aktuell offene Shell bekommt das nicht automatisch mit. | 10 | - **Nach jedem Skript-Lauf ein neues Terminal öffnen**, bevor `nvim` das erste Mal gestartet wird. PATH-Änderungen (durch winget/npm-Installer oder `install-win.ps1`) landen in der Registry, aber die aktuell offene Shell bekommt das nicht automatisch mit. |
| 11 | - **PATH-Registrierung stichprobenartig prüfen** – manche winget-Pakete tragen sich nicht automatisch in den PATH ein (im Praxistest z. B. `LLVM.LLVM`: bereits installiert, aber `clangd` nicht im PATH, vermutlich weil der `--silent`-Installer die PATH-Registrierung überspringt). Nach einem neuen Terminal kurz `Get-Command clangd, jq, make` aufrufen; fehlt eins, dessen Installationsordner (bei LLVM z. B. `C:\Program Files\LLVM\bin`) manuell zum User-PATH hinzufügen (gleiches Muster wie `Add-BinToUserPath` in `install-win.ps1`). | 11 | - **PATH-Registrierung stichprobenartig prüfen** – manche winget-Pakete tragen sich nicht automatisch in den PATH ein (im Praxistest z. B. `LLVM.LLVM`: bereits installiert, aber `clangd` nicht im PATH, vermutlich weil der `--silent`-Installer die PATH-Registrierung überspringt). Nach einem neuen Terminal kurz `Get-Command clangd, jq, make` aufrufen; fehlt eins, dessen Installationsordner (bei LLVM z. B. `C:\Program Files\LLVM\bin`) manuell zum User-PATH hinzufügen (gleiches Muster wie `Add-BinToUserPath` in `install-win.ps1`). |
| 12 | - **yamlfmt, gawk, xmllint (libxml2) manuell installieren, falls benötigt** – im Praxistest bestätigt, dass es dafür keine winget-Pakete gibt ("Es wurde kein Paket gefunden, das den Eingabekriterien entspricht"), deshalb absichtlich nicht in `bootstrap-win/neovim.ps1` enthalten. Betrifft nur die Formatierung von awk-, xml/xsd- und yaml-Dateien (`conform.nvim` fällt sonst auf LSP-Formatierung zurück). Bekannte Alternativen: yamlfmt via `go install github.com/google/yamlfmt/cmd/yamlfmt@latest` (falls Go installiert) oder Binary von den GitHub-Releases; für gawk/xmllint keine verifizierte Windows-native Quelle gefunden, ggf. `winget search gawk` / `winget search libxml2` selbst prüfen. | 12 | - **yamlfmt, gawk, xmllint (libxml2) manuell installieren, falls benötigt** – im Praxistest bestätigt, dass es dafür keine winget-Pakete gibt ("Es wurde kein Paket gefunden, das den Eingabekriterien entspricht"), deshalb absichtlich nicht in `bootstrap-win/neovim.ps1` enthalten. Betrifft nur die Formatierung von awk-, xml/xsd- und yaml-Dateien (`conform.nvim` fällt sonst auf LSP-Formatierung zurück). Bekannte Alternativen: yamlfmt via `go install github.com/google/yamlfmt/cmd/yamlfmt@latest` (falls Go installiert) oder Binary von den GitHub-Releases; für gawk/xmllint keine verifizierte Windows-native Quelle gefunden, ggf. `winget search gawk` / `winget search libxml2` selbst prüfen. |
| 13 | - **Reihenfolge**: `install-win.ps1`, `bootstrap-win/git.ps1`, `bootstrap-win/neovim.ps1` und `bootstrap-win/neovim-dict.ps1` sind unabhängig voneinander. Empfehlenswert: erst Neovim/Node (Abschnitt 1) installieren, dann alle Bootstrap-Skripte laufen lassen, dann neues Terminal öffnen, dann `nvim` starten (lädt beim ersten Start automatisch alle Lua-Plugins via `lazy.nvim` – Internetverbindung nötig). | 13 | - **Reihenfolge**: `install-win.ps1`, `bootstrap-win/git.ps1`, `bootstrap-win/neovim.ps1` und `bootstrap-win/neovim-dict.ps1` sind unabhängig voneinander. Empfehlenswert: erst Neovim/Node (Abschnitt 1) installieren, dann alle Bootstrap-Skripte laufen lassen, dann neues Terminal öffnen, dann `nvim` starten (lädt beim ersten Start automatisch alle Lua-Plugins via `lazy.nvim` – Internetverbindung nötig). |
| 14 | - **Neovim immer aus einer "Developer PowerShell for VS" starten** (Startmenü-Eintrag, den Visual Studio/die Build Tools mitbringen), nicht aus normalem Windows Terminal/PowerShell. `cl.exe` (MSVC) braucht die `INCLUDE`/`LIB`-Umgebungsvariablen aus `vcvarsall.bat`, die nur in dieser Developer-Shell gesetzt sind – siehe Abschnitt 4. | 14 | - **Neovim immer aus einer "Developer PowerShell for VS" starten** (Startmenü-Eintrag, den Visual Studio/die Build Tools mitbringen), nicht aus normalem Windows Terminal/PowerShell. `cl.exe` (MSVC) braucht die `INCLUDE`/`LIB`-Umgebungsvariablen aus `vcvarsall.bat`, die nur in dieser Developer-Shell gesetzt sind – siehe Abschnitt 4. |
| 15 | 15 | ||
| 16 | ## 1. Grundwerkzeuge installieren | 16 | ## 1. Grundwerkzeuge installieren |
| 17 | 17 | ||
| 18 | Execution Policy einmalig setzen, sonst starten die `.ps1`-Skripte in diesem Repo gar nicht (Alternative pro Aufruf: `powershell -ExecutionPolicy Bypass -File .\skript.ps1`): | 18 | Execution Policy einmalig setzen, sonst starten die `.ps1`-Skripte in diesem Repo gar nicht (Alternative pro Aufruf: `powershell -ExecutionPolicy Bypass -File .\skript.ps1`): |
| 19 | 19 | ||
| 20 | ```powershell | 20 | ```powershell |
| 21 | Set-ExecutionPolicy -Scope CurrentUser RemoteSigned | 21 | Set-ExecutionPolicy -Scope CurrentUser RemoteSigned |
| 22 | winget install Neovim.Neovim | 22 | winget install Neovim.Neovim |
| 23 | winget install OpenJS.NodeJS.LTS | 23 | winget install OpenJS.NodeJS.LTS |
| 24 | ``` | 24 | ``` |
| 25 | 25 | ||
| 26 | Git und `delta` (Pager, von `git/config` vorausgesetzt: `pager = delta`, `diffFilter = delta --color-only`) installiert `bootstrap-win/git.ps1`: | 26 | Git und `delta` (Pager, von `git/config` vorausgesetzt: `pager = delta`, `diffFilter = delta --color-only`) installiert `bootstrap-win/git.ps1`: |
| 27 | 27 | ||
| 28 | ```powershell | 28 | ```powershell |
| 29 | .\bootstrap-win\git.ps1 | 29 | .\bootstrap-win\git.ps1 |
| 30 | ``` | 30 | ``` |
| 31 | 31 | ||
| 32 | (Kein Python nötig – der Python-Provider ist in `options.lua` deaktiviert. Auch kein separater C-Compiler nötig – MSVC ist auf den Zielsystemen bereits vorhanden, siehe Abschnitt 3 bzw. 4.) | 32 | (Kein Python nötig – der Python-Provider ist in `options.lua` deaktiviert. Auch kein separater C-Compiler nötig – MSVC ist auf den Zielsystemen bereits vorhanden, siehe Abschnitt 3 bzw. 4.) |
| 33 | 33 | ||
| 34 | ## 2. Konfiguration einrichten (Windows-nativer Weg) | 34 | ## 2. Konfiguration einrichten (Windows-nativer Weg) |
| 35 | 35 | ||
| 36 | `install-win.ps1` im Repo-Root ausführen: | 36 | `install-win.ps1` im Repo-Root ausführen: |
| 37 | 37 | ||
| 38 | ```powershell | 38 | ```powershell |
| 39 | .\install-win.ps1 | 39 | .\install-win.ps1 |
| 40 | ``` | 40 | ``` |
| 41 | 41 | ||
| 42 | Es kopiert (keine Symlinks, keine Admin-Rechte nötig): | 42 | Es kopiert (keine Symlinks, keine Admin-Rechte nötig): |
| 43 | 43 | ||
| 44 | - `nvim/` → `%LOCALAPPDATA%\nvim` | 44 | - `nvim/` → `%LOCALAPPDATA%\nvim` |
| 45 | - `git/config` → `%USERPROFILE%\.gitconfig` | 45 | - `git/config` → `%USERPROFILE%\.gitconfig` |
| 46 | - `git/config-up2parts` → `%USERPROFILE%\.config\git\config-up2parts` (Pfad ist im `includeIf` von `git/config` hartkodiert) | 46 | - `git/config-up2parts` → `%USERPROFILE%\.config\git\config-up2parts` (Pfad ist im `includeIf` von `git/config` hartkodiert) |
| 47 | - `npm/npmrc` → `%USERPROFILE%\.npmrc` (nur falls dort noch keine Datei existiert) – die Zeile `prefix=${HOME}/.local` wird dabei auskommentiert: `HOME` ist unter Windows i. d. R. nicht gesetzt, npm nutzt dort ohnehin schon von Haus aus `%APPDATA%\npm` als Präfix | 47 | - `npm/npmrc` → `%USERPROFILE%\.npmrc` (nur falls dort noch keine Datei existiert) – die Zeile `prefix=${HOME}/.local` wird dabei auskommentiert: `HOME` ist unter Windows i. d. R. nicht gesetzt, npm nutzt dort ohnehin schon von Haus aus `%APPDATA%\npm` als Präfix |
| 48 | 48 | ||
| 49 | Nach Änderungen im Repo `install-win.ps1` erneut ausführen, um die Kopien zu aktualisieren. | 49 | Nach Änderungen im Repo `install-win.ps1` erneut ausführen, um die Kopien zu aktualisieren. |
| 50 | 50 | ||
| 51 | ## 3. Externe Abhängigkeiten | 51 | ## 3. Externe Abhängigkeiten |
| 52 | 52 | ||
| 53 | `bootstrap/neovim.sh` bricht unter Windows sofort ab (`Nicht unterstütztes Betriebssystem`). Stattdessen `bootstrap-win/neovim.ps1` ausführen (reines PowerShell, kein Git Bash/WSL nötig): | 53 | `bootstrap/neovim.sh` bricht unter Windows sofort ab (`Nicht unterstütztes Betriebssystem`). Stattdessen `bootstrap-win/neovim.ps1` ausführen (reines PowerShell, kein Git Bash/WSL nötig): |
| 54 | 54 | ||
| 55 | ```powershell | 55 | ```powershell |
| 56 | .\bootstrap-win\neovim.ps1 | 56 | .\bootstrap-win\neovim.ps1 |
| 57 | ``` | 57 | ``` |
| 58 | 58 | ||
| 59 | Installiert per `winget`/`npm`: Git, Node, Formatter (jq, prettier, ruff, shfmt, stylua), Tools (ripgrep, fd, tree-sitter-cli, make über `ezwinports.make`) und LSP-Server (basedpyright, bash-language-server, clangd, shellcheck, vscode-langservers-extracted, lua-language-server, prisma, vtsls). Im Praxistest (24.07.2026) erfolgreich; yamlfmt/gawk/xmllint bewusst nicht enthalten (siehe Abschnitt 0). Einzelne Pakete, die trotzdem fehlschlagen, werden als Warnung gemeldet statt das Skript abzubrechen, inklusive der letzten Zeilen der winget-Fehlermeldung. | 59 | Installiert per `winget`/`npm`: Git, Node, Formatter (jq, prettier, ruff, shfmt, stylua), Tools (ripgrep, fd, tree-sitter-cli, make über `ezwinports.make`) und LSP-Server (basedpyright, bash-language-server, clangd, shellcheck, vscode-langservers-extracted, lua-language-server, prisma, vtsls). Im Praxistest (24.07.2026) erfolgreich; yamlfmt/gawk/xmllint bewusst nicht enthalten (siehe Abschnitt 0). Einzelne Pakete, die trotzdem fehlschlagen, werden als Warnung gemeldet statt das Skript abzubrechen, inklusive der letzten Zeilen der winget-Fehlermeldung. |
| 60 | 60 | ||
| 61 | Kein C-Compiler-Paket enthalten: MSVC ist auf den Zielsystemen bereits vorhanden, `nvim-treesitter` nutzt `cl.exe`. Dafür muss Neovim aber aus einer "Developer PowerShell for VS" gestartet werden (siehe Abschnitt 4). | 61 | Kein C-Compiler-Paket enthalten: MSVC ist auf den Zielsystemen bereits vorhanden, `nvim-treesitter` nutzt `cl.exe`. Dafür muss Neovim aber aus einer "Developer PowerShell for VS" gestartet werden (siehe Abschnitt 4). |
| 62 | 62 | ||
| 63 | `windows\bin` (enthält `gmake.cmd`, Wrapper für `opt.makeprg = "gmake"`) danach einmalig zum PATH hinzufügen (PowerShell, User-Scope – nicht `setx PATH "%PATH%;..."` verwenden, das würde den kompletten Prozess-PATH inkl. System-Anteil dauerhaft in den User-PATH kopieren): | 63 | `windows\bin` (enthält `gmake.cmd`, Wrapper für `opt.makeprg = "gmake"`) danach einmalig zum PATH hinzufügen (PowerShell, User-Scope – nicht `setx PATH "%PATH%;..."` verwenden, das würde den kompletten Prozess-PATH inkl. System-Anteil dauerhaft in den User-PATH kopieren): |
| 64 | 64 | ||
| 65 | ```powershell | 65 | ```powershell |
| 66 | $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") | 66 | $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") |
| 67 | [Environment]::SetEnvironmentVariable("PATH", "$userPath;$env:USERPROFILE\dotfiles\windows\bin", "User") | 67 | [Environment]::SetEnvironmentVariable("PATH", "$userPath;$env:USERPROFILE\dotfiles\windows\bin", "User") |
| 68 | ``` | 68 | ``` |
| 69 | 69 | ||
| 70 | ## 4. Bekannte Stolpersteine | 70 | ## 4. Bekannte Stolpersteine |
| 71 | 71 | ||
| 72 | - **C-Compiler für `nvim-treesitter` (MSVC)**: `cl.exe` findet `nvim-treesitter` automatisch, aber nur wenn `INCLUDE`/`LIB` gesetzt sind – das passiert ausschließlich in einer "Developer PowerShell for VS" bzw. "x64 Native Tools Command Prompt", nicht in einer normalen PowerShell/Windows Terminal-Sitzung. Ohne das schlägt die Parser-Kompilierung mit einer Meldung wie "cannot find `<header>`.h" fehl, obwohl `cl.exe` selbst gefunden wird. Neovim also immer aus dieser Developer-Shell heraus starten. | 72 | - **C-Compiler für `nvim-treesitter` (MSVC)**: `cl.exe` findet `nvim-treesitter` automatisch, aber nur wenn `INCLUDE`/`LIB` gesetzt sind – das passiert ausschließlich in einer "Developer PowerShell for VS" bzw. "x64 Native Tools Command Prompt", nicht in einer normalen PowerShell/Windows Terminal-Sitzung. Ohne das schlägt die Parser-Kompilierung mit einer Meldung wie "cannot find `<header>`.h" fehl, obwohl `cl.exe` selbst gefunden wird. Neovim also immer aus dieser Developer-Shell heraus starten. |
| 73 | - **clangd bei MSVC-Projekten (z. B. mit `compile_commands.json` aus einem `msbuild`-Rebuild)**: gleicher Grund wie oben. Eine generierte `compile_commands.json` enthält nur die projektspezifischen `/I`-Pfade (vcpkg, NuGet-SDKs), nicht die MSVC-STL-/Windows-SDK-Header – die bezieht `clang-cl` (wie `cl.exe`) über `INCLUDE`/`LIB`. Ohne Developer-Shell meldet clangd `<string>`/`<windows.h>` etc. als nicht gefunden, obwohl die Projekt-Header aufgelöst werden. | 73 | - **clangd bei MSVC-Projekten (z. B. mit `compile_commands.json` aus einem `msbuild`-Rebuild)**: gleicher Grund wie oben. Eine generierte `compile_commands.json` enthält nur die projektspezifischen `/I`-Pfade (vcpkg, NuGet-SDKs), nicht die MSVC-STL-/Windows-SDK-Header – die bezieht `clang-cl` (wie `cl.exe`) über `INCLUDE`/`LIB`. Ohne Developer-Shell meldet clangd `<string>`/`<windows.h>` etc. als nicht gefunden, obwohl die Projekt-Header aufgelöst werden. |
| 74 | 74 | ||
| 75 | ## 5. Verifizieren | 75 | ## 5. Verifizieren |
| 76 | 76 | ||
| 77 | ``` | 77 | ``` |
| 78 | nvim | 78 | nvim |
| 79 | :checkhealth | 79 | :checkhealth |
| 80 | ``` | 80 | ``` |
| 81 | 81 | ||
| 82 | `:checkhealth` zeigt fehlende Provider/Tools direkt an – guter letzter Schritt nach der Installation. | 82 | `:checkhealth` zeigt fehlende Provider/Tools direkt an – guter letzter Schritt nach der Installation. |
| 83 | 83 | ||
| 84 | ## 6. Aktualisieren | 84 | ## 6. Aktualisieren |
| 85 | 85 | ||
| 86 | Pendant zu `brew update && brew upgrade` (macOS) bzw. `pkg update && pkg upgrade` (FreeBSD): | 86 | Pendant zu `brew update && brew upgrade` (macOS) bzw. `pkg update && pkg upgrade` (FreeBSD): |
| 87 | 87 | ||
| 88 | ```powershell | 88 | ```powershell |
| 89 | winget source update # Paketquellen aktualisieren | 89 | winget source update # Paketquellen aktualisieren |
| 90 | winget upgrade --all # alle winget-Pakete aktualisieren | 90 | winget upgrade --all # alle winget-Pakete aktualisieren |
| 91 | ``` | 91 | ``` |
| 92 | 92 | ||
| 93 | Vorschau, was aktualisiert würde, ohne etwas zu ändern: | 93 | Vorschau, was aktualisiert würde, ohne etwas zu ändern: |
| 94 | 94 | ||
| 95 | ```powershell | 95 | ```powershell |
| 96 | winget list --upgrade-available | 96 | winget list --upgrade-available |
| 97 | ``` | 97 | ``` |
| 98 | 98 | ||
| 99 | Einzelnes Paket gezielt aktualisieren (IDs siehe `bootstrap-win/neovim.ps1`): | 99 | Einzelnes Paket gezielt aktualisieren (IDs siehe `bootstrap-win/neovim.ps1`): |
| 100 | 100 | ||
| 101 | ```powershell | 101 | ```powershell |
| 102 | winget upgrade LLVM.LLVM | 102 | winget upgrade LLVM.LLVM |
| 103 | ``` | 103 | ``` |
| 104 | 104 | ||
| 105 | Zwei Besonderheiten gegenüber brew/pkg: | 105 | Zwei Besonderheiten gegenüber brew/pkg: |
| 106 | 106 | ||
| 107 | - Manche Pakete melden nicht immer zuverlässig eine neue Version (z. B. ältere/portable Pakete). `winget upgrade --all --include-unknown` bezieht auch diese mit ein, installiert dabei aber unter Umständen unnötig neu. | 107 | - Manche Pakete melden nicht immer zuverlässig eine neue Version (z. B. ältere/portable Pakete). `winget upgrade --all --include-unknown` bezieht auch diese mit ein, installiert dabei aber unter Umständen unnötig neu. |
| 108 | - Ein Paket dauerhaft von `--all` ausnehmen: `winget pin add <id>` (Pendant zu `brew pin`). | 108 | - Ein Paket dauerhaft von `--all` ausnehmen: `winget pin add <id>` (Pendant zu `brew pin`). |
| 109 | 109 | ||
| 110 | Die npm-Pakete (`prettier`, `basedpyright`, `bash-language-server`, `vtsls`, `@prisma/language-server`, `vscode-langservers-extracted`) laufen außerhalb von winget und werden separat aktualisiert: | 110 | Die npm-Pakete (`prettier`, `basedpyright`, `bash-language-server`, `vtsls`, `@prisma/language-server`, `vscode-langservers-extracted`) laufen außerhalb von winget und werden separat aktualisiert: |
| 111 | 111 | ||
| 112 | ```powershell | 112 | ```powershell |
| 113 | npm update -g | 113 | npm update -g |
| 114 | ``` | 114 | ``` |
| 115 | 115 | ||
| 116 | `bootstrap-win/neovim.ps1` erneut auszuführen aktualisiert nichts – `Install-WingetPackage`/`Install-NpmPackage` überspringen ein Paket, sobald das Binary gefunden wird (siehe `Write-Skip`). Für Updates immer die Befehle oben verwenden. | 116 | `bootstrap-win/neovim.ps1` erneut auszuführen aktualisiert nichts – `Install-WingetPackage`/`Install-NpmPackage` überspringen ein Paket, sobald das Binary gefunden wird (siehe `Write-Skip`). Für Updates immer die Befehle oben verwenden. |
diff --git a/newsboat/config b/newsboat/config index 0d39ad5..dc69cc5 100644 --- a/newsboat/config +++ b/newsboat/config | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | # vim: filetype=conf | 1 | # vim: filetype=conf |
| 2 | 2 | ||
| 3 | auto-reload yes | 3 | auto-reload yes |
| 4 | reload-time 10 | 4 | reload-time 10 |
| 5 | browser "firefox --new-tab %u" | 5 | browser "firefox --new-tab %u" |
| 6 | confirm-mark-all-feeds-read no | 6 | confirm-mark-all-feeds-read no |
| 7 | confirm-mark-feed-read no | 7 | confirm-mark-feed-read no |
| 8 | goto-first-unread no | 8 | goto-first-unread no |
| 9 | goto-next-feed no | 9 | goto-next-feed no |
| 10 | keep-articles-days 180 | 10 | keep-articles-days 180 |
| 11 | max-items 500 | 11 | max-items 500 |
| 12 | cleanup-on-quit yes | 12 | cleanup-on-quit yes |
| 13 | 13 | ||
| 14 | download-path "~/Downloads/!Podcasts" | 14 | download-path "~/Downloads/!Podcasts" |
| 15 | download-filename-format "F-%t.%e" | 15 | download-filename-format "F-%t.%e" |
| 16 | 16 | ||
| 17 | bind-key j down feedlist | 17 | bind-key j down feedlist |
| 18 | bind-key k up feedlist | 18 | bind-key k up feedlist |
| 19 | bind-key j next articlelist | 19 | bind-key j next articlelist |
| 20 | bind-key k prev articlelist | 20 | bind-key k prev articlelist |
| 21 | bind-key J next-feed articlelist | 21 | bind-key J next-feed articlelist |
| 22 | bind-key K prev-feed articlelist | 22 | bind-key K prev-feed articlelist |
| 23 | bind-key j down article | 23 | bind-key j down article |
| 24 | bind-key k up article | 24 | bind-key k up article |
| 25 | 25 | ||
| 26 | macro o set browser "mpv %u" ; open-in-browser ; set browser "firefox --new-tab %u" | 26 | macro o set browser "mpv %u" ; open-in-browser ; set browser "firefox --new-tab %u" |
| 27 | 27 | ||
| 28 | color background default default | 28 | color background default default |
| 29 | color listnormal color255 default | 29 | color listnormal color255 default |
| 30 | color listfocus color238 color255 standout | 30 | color listfocus color238 color255 standout |
| 31 | color listnormal_unread color47 default | 31 | color listnormal_unread color47 default |
| 32 | color listfocus_unread color238 color47 standout | 32 | color listfocus_unread color238 color47 standout |
| 33 | color info color141 color236 | 33 | color info color141 color236 |
| 34 | 34 | ||
| 35 | # highlights | 35 | # highlights |
| 36 | highlight all "---.*---" yellow | 36 | highlight all "---.*---" yellow |
| 37 | highlight feedlist ".*(0/0))" color237 default default | 37 | highlight feedlist ".*(0/0))" color237 default default |
| 38 | highlight article "(^Feed:|^Title:|^Date:|^Link:|^Author:)" cyan default bold | 38 | highlight article "(^Feed:|^Title:|^Date:|^Link:|^Author:)" cyan default bold |
| 39 | highlight article "https?://[^ ]+" yellow default | 39 | highlight article "https?://[^ ]+" yellow default |
| 40 | highlight article "\\[[0-9][0-9]*\\]" magenta default bold | 40 | highlight article "\\[[0-9][0-9]*\\]" magenta default bold |
| 41 | highlight article "\\[image\\ [0-9]+\\]" green default bold | 41 | highlight article "\\[image\\ [0-9]+\\]" green default bold |
| 42 | highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold | 42 | highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold |
| 43 | highlight article ":.*\\(link\\)$" cyan default | 43 | highlight article ":.*\\(link\\)$" cyan default |
| 44 | highlight article ":.*\\(image\\)$" blue default | 44 | highlight article ":.*\\(image\\)$" blue default |
| 45 | highlight article ":.*\\(embedded flash\\)$" magenta default | 45 | highlight article ":.*\\(embedded flash\\)$" magenta default |
| 46 | 46 | ||
diff --git a/nexrc/nexrc b/nexrc/nexrc index 648ee6a..442c5fc 100644 --- a/nexrc/nexrc +++ b/nexrc/nexrc | |||
| @@ -1,22 +1,22 @@ | |||
| 1 | set number | 1 | set number |
| 2 | 2 | ||
| 3 | set autoindent | 3 | set autoindent |
| 4 | set tabstop=4 | 4 | set tabstop=4 |
| 5 | set shiftwidth=4 | 5 | set shiftwidth=4 |
| 6 | 6 | ||
| 7 | set extend | 7 | set extend |
| 8 | set magic | 8 | set magic |
| 9 | set searchincr | 9 | set searchincr |
| 10 | set iclower | 10 | set iclower |
| 11 | 11 | ||
| 12 | set showmatch | 12 | set showmatch |
| 13 | 13 | ||
| 14 | set fileencoding=utf-8 | 14 | set fileencoding=utf-8 |
| 15 | set inputencoding=utf-8 | 15 | set inputencoding=utf-8 |
| 16 | 16 | ||
| 17 | set ruler | 17 | set ruler |
| 18 | set windowname | 18 | set windowname |
| 19 | 19 | ||
| 20 | set noerrorbells | 20 | set noerrorbells |
| 21 | set noflash | 21 | set noflash |
| 22 | 22 | ||
diff --git a/nvim/ftplugin/gitolite.lua b/nvim/ftplugin/gitolite.lua index c5d1305..acbde0f 100644 --- a/nvim/ftplugin/gitolite.lua +++ b/nvim/ftplugin/gitolite.lua | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.expandtab = true | 3 | opt.expandtab = true |
| 4 | opt.shiftwidth = 4 | 4 | opt.shiftwidth = 4 |
diff --git a/nvim/ftplugin/html.lua b/nvim/ftplugin/html.lua index 009e21d..98580db 100644 --- a/nvim/ftplugin/html.lua +++ b/nvim/ftplugin/html.lua | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.tabstop = 2 | 3 | opt.tabstop = 2 |
| 4 | opt.softtabstop = 2 | 4 | opt.softtabstop = 2 |
| 5 | opt.shiftwidth = 2 | 5 | opt.shiftwidth = 2 |
| 6 | opt.expandtab = true | 6 | opt.expandtab = true |
| 7 | opt.autoindent = true | 7 | opt.autoindent = true |
| 8 | opt.foldenable = true | 8 | opt.foldenable = true |
diff --git a/nvim/ftplugin/lua.lua b/nvim/ftplugin/lua.lua index 096143b..087e84c 100644 --- a/nvim/ftplugin/lua.lua +++ b/nvim/ftplugin/lua.lua | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.expandtab = true | 3 | opt.expandtab = true |
| 4 | opt.shiftwidth = 2 | 4 | opt.shiftwidth = 2 |
| 5 | opt.softtabstop = 2 | 5 | opt.softtabstop = 2 |
| 6 | opt.tabstop = 2 | 6 | opt.tabstop = 2 |
diff --git a/nvim/ftplugin/markdown.lua b/nvim/ftplugin/markdown.lua index 5f07330..dca68dd 100644 --- a/nvim/ftplugin/markdown.lua +++ b/nvim/ftplugin/markdown.lua | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.wrap = true | 3 | opt.wrap = true |
diff --git a/nvim/ftplugin/sh.lua b/nvim/ftplugin/sh.lua index cda52f1..4bde5f7 100644 --- a/nvim/ftplugin/sh.lua +++ b/nvim/ftplugin/sh.lua | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.expandtab = true | 3 | opt.expandtab = true |
| 4 | opt.shiftwidth = 2 | 4 | opt.shiftwidth = 2 |
diff --git a/nvim/ftplugin/taskedit.lua b/nvim/ftplugin/taskedit.lua index a905acb..ebc56aa 100644 --- a/nvim/ftplugin/taskedit.lua +++ b/nvim/ftplugin/taskedit.lua | |||
| @@ -1 +1 @@ | |||
| vim.cmd.runtime("ftplugin/taskwarrior.lua") | vim.cmd.runtime("ftplugin/taskwarrior.lua") | ||
diff --git a/nvim/ftplugin/taskwarrior.lua b/nvim/ftplugin/taskwarrior.lua index a3c4537..64f8ed7 100644 --- a/nvim/ftplugin/taskwarrior.lua +++ b/nvim/ftplugin/taskwarrior.lua | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.autoindent = false | 3 | opt.autoindent = false |
| 4 | opt.cindent = false | 4 | opt.cindent = false |
| 5 | opt.indentexpr = "" | 5 | opt.indentexpr = "" |
| 6 | opt.indentkeys = "" | 6 | opt.indentkeys = "" |
| 7 | opt.smartindent = false | 7 | opt.smartindent = false |
diff --git a/nvim/ftplugin/typescript.lua b/nvim/ftplugin/typescript.lua index 096143b..087e84c 100644 --- a/nvim/ftplugin/typescript.lua +++ b/nvim/ftplugin/typescript.lua | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | local opt = vim.opt_local | 1 | local opt = vim.opt_local |
| 2 | 2 | ||
| 3 | opt.expandtab = true | 3 | opt.expandtab = true |
| 4 | opt.shiftwidth = 2 | 4 | opt.shiftwidth = 2 |
| 5 | opt.softtabstop = 2 | 5 | opt.softtabstop = 2 |
| 6 | opt.tabstop = 2 | 6 | opt.tabstop = 2 |
diff --git a/nvim/init.lua b/nvim/init.lua index e56561e..bda12b3 100644 --- a/nvim/init.lua +++ b/nvim/init.lua | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | require("config.options") | 1 | require("config.options") |
| 2 | 2 | ||
| 3 | local keymaps = require("config.keymaps") | 3 | local keymaps = require("config.keymaps") |
| 4 | keymaps.global() | 4 | keymaps.global() |
| 5 | 5 | ||
| 6 | require("config.autocmds") | 6 | require("config.autocmds") |
| 7 | require("config.usercmds") | 7 | require("config.usercmds") |
| 8 | require("config.lazy") | 8 | require("config.lazy") |
| 9 | require("config.colorscheme") | 9 | require("config.colorscheme") |
diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index 53bf7a9..58adafb 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua | |||
| @@ -1,43 +1,43 @@ | |||
| 1 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main/doc/nvim-treesitter.txt | 1 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main/doc/nvim-treesitter.txt |
| 2 | local treesitter_languages = require("config.treesitter").languages | 2 | local treesitter_languages = require("config.treesitter").languages |
| 3 | 3 | ||
| 4 | local function enable_treesitter_features() | 4 | local function enable_treesitter_features() |
| 5 | if not pcall(vim.treesitter.start) then return end | 5 | if not pcall(vim.treesitter.start) then return end |
| 6 | 6 | ||
| 7 | vim.wo.foldmethod = "expr" | 7 | vim.wo.foldmethod = "expr" |
| 8 | vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()" | 8 | vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()" |
| 9 | vim.bo.indentexpr = "v:lua.require('nvim-treesitter').indentexpr()" | 9 | vim.bo.indentexpr = "v:lua.require('nvim-treesitter').indentexpr()" |
| 10 | end | 10 | end |
| 11 | 11 | ||
| 12 | vim.api.nvim_create_autocmd("FileType", { | 12 | vim.api.nvim_create_autocmd("FileType", { |
| 13 | pattern = treesitter_languages, | 13 | pattern = treesitter_languages, |
| 14 | callback = enable_treesitter_features, | 14 | callback = enable_treesitter_features, |
| 15 | }) | 15 | }) |
| 16 | 16 | ||
| 17 | -- https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close | 17 | -- https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close |
| 18 | vim.api.nvim_create_autocmd("QuitPre", { | 18 | vim.api.nvim_create_autocmd("QuitPre", { |
| 19 | callback = function() | 19 | callback = function() |
| 20 | local invalid_win = {} | 20 | local invalid_win = {} |
| 21 | local wins = vim.api.nvim_list_wins() | 21 | local wins = vim.api.nvim_list_wins() |
| 22 | 22 | ||
| 23 | for _, w in ipairs(wins) do | 23 | for _, w in ipairs(wins) do |
| 24 | local bufname = vim.api.nvim_buf_get_name(vim.api.nvim_win_get_buf(w)) | 24 | local bufname = vim.api.nvim_buf_get_name(vim.api.nvim_win_get_buf(w)) |
| 25 | if bufname:match("NvimTree_") ~= nil then table.insert(invalid_win, w) end | 25 | if bufname:match("NvimTree_") ~= nil then table.insert(invalid_win, w) end |
| 26 | end | 26 | end |
| 27 | 27 | ||
| 28 | if #invalid_win == #wins - 1 then | 28 | if #invalid_win == #wins - 1 then |
| 29 | -- Should quit, so we close all invalid windows. | 29 | -- Should quit, so we close all invalid windows. |
| 30 | for _, w in ipairs(invalid_win) do | 30 | for _, w in ipairs(invalid_win) do |
| 31 | vim.api.nvim_win_close(w, true) | 31 | vim.api.nvim_win_close(w, true) |
| 32 | end | 32 | end |
| 33 | end | 33 | end |
| 34 | end, | 34 | end, |
| 35 | }) | 35 | }) |
| 36 | 36 | ||
| 37 | vim.api.nvim_create_autocmd("LspAttach", { | 37 | vim.api.nvim_create_autocmd("LspAttach", { |
| 38 | callback = function(event) | 38 | callback = function(event) |
| 39 | local client = vim.lsp.get_client_by_id(event.data.client_id) | 39 | local client = vim.lsp.get_client_by_id(event.data.client_id) |
| 40 | local keymaps = require("config.keymaps") | 40 | local keymaps = require("config.keymaps") |
| 41 | keymaps.lsp(event.buf, client) | 41 | keymaps.lsp(event.buf, client) |
| 42 | end, | 42 | end, |
| 43 | }) | 43 | }) |
diff --git a/nvim/lua/config/colorscheme.lua b/nvim/lua/config/colorscheme.lua index 8d944c3..dfc8d24 100644 --- a/nvim/lua/config/colorscheme.lua +++ b/nvim/lua/config/colorscheme.lua | |||
| @@ -1,17 +1,17 @@ | |||
| 1 | -- Fix: Farbschema für Rechtschreibfehler | 1 | -- Fix: Farbschema für Rechtschreibfehler |
| 2 | vim.api.nvim_set_hl(0, "SpellBad", { fg = "#ffffff", bg = "#5f0000" }) | 2 | vim.api.nvim_set_hl(0, "SpellBad", { fg = "#ffffff", bg = "#5f0000" }) |
| 3 | vim.api.nvim_set_hl(0, "SpellCap", { fg = "#000000", bg = "#ffaf00" }) | 3 | vim.api.nvim_set_hl(0, "SpellCap", { fg = "#000000", bg = "#ffaf00" }) |
| 4 | vim.api.nvim_set_hl(0, "SpellRare", { fg = "#000000", bg = "#5fd7ff" }) | 4 | vim.api.nvim_set_hl(0, "SpellRare", { fg = "#000000", bg = "#5fd7ff" }) |
| 5 | vim.api.nvim_set_hl(0, "SpellLocal", { fg = "#000000", bg = "#5fff87" }) | 5 | vim.api.nvim_set_hl(0, "SpellLocal", { fg = "#000000", bg = "#5fff87" }) |
| 6 | vim.api.nvim_set_hl(0, "CursorLine", { bg = "#252526" }) | 6 | vim.api.nvim_set_hl(0, "CursorLine", { bg = "#252526" }) |
| 7 | 7 | ||
| 8 | -- Statusline Farben | 8 | -- Statusline Farben |
| 9 | vim.api.nvim_set_hl(0, "StatuslineModeNormal", { fg = "#1e222a", bg = "#61afef", bold = true }) | 9 | vim.api.nvim_set_hl(0, "StatuslineModeNormal", { fg = "#1e222a", bg = "#61afef", bold = true }) |
| 10 | vim.api.nvim_set_hl(0, "StatuslineModeInsert", { fg = "#1e222a", bg = "#98c379", bold = true }) | 10 | vim.api.nvim_set_hl(0, "StatuslineModeInsert", { fg = "#1e222a", bg = "#98c379", bold = true }) |
| 11 | vim.api.nvim_set_hl(0, "StatuslineModeVisual", { fg = "#1e222a", bg = "#c678dd", bold = true }) | 11 | vim.api.nvim_set_hl(0, "StatuslineModeVisual", { fg = "#1e222a", bg = "#c678dd", bold = true }) |
| 12 | vim.api.nvim_set_hl(0, "StatuslineModeReplace", { fg = "#1e222a", bg = "#e86671", bold = true }) | 12 | vim.api.nvim_set_hl(0, "StatuslineModeReplace", { fg = "#1e222a", bg = "#e86671", bold = true }) |
| 13 | vim.api.nvim_set_hl(0, "StatuslineModeCommand", { fg = "#1e222a", bg = "#e5c07b", bold = true }) | 13 | vim.api.nvim_set_hl(0, "StatuslineModeCommand", { fg = "#1e222a", bg = "#e5c07b", bold = true }) |
| 14 | 14 | ||
| 15 | -- NVim-Tree | 15 | -- NVim-Tree |
| 16 | vim.api.nvim_set_hl(0, "NvimTreeOpenedFile", { bold = true }) | 16 | vim.api.nvim_set_hl(0, "NvimTreeOpenedFile", { bold = true }) |
| 17 | vim.api.nvim_set_hl(0, "NvimTreeCursorLine", { bg = "#2A2D2E" }) | 17 | vim.api.nvim_set_hl(0, "NvimTreeCursorLine", { bg = "#2A2D2E" }) |
diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 76f59cb..972e777 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua | |||
| @@ -1,32 +1,32 @@ | |||
| 1 | -- https://lazy.folke.io/installation | 1 | -- https://lazy.folke.io/installation |
| 2 | 2 | ||
| 3 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | 3 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" |
| 4 | if not vim.uv.fs_stat(lazypath) then | 4 | if not vim.uv.fs_stat(lazypath) then |
| 5 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" | 5 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" |
| 6 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | 6 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) |
| 7 | if vim.v.shell_error ~= 0 then | 7 | if vim.v.shell_error ~= 0 then |
| 8 | vim.api.nvim_echo({ | 8 | vim.api.nvim_echo({ |
| 9 | { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | 9 | { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, |
| 10 | { out, "WarningMsg" }, | 10 | { out, "WarningMsg" }, |
| 11 | { "\nPress any key to exit..." }, | 11 | { "\nPress any key to exit..." }, |
| 12 | }, true, {}) | 12 | }, true, {}) |
| 13 | vim.fn.getchar() | 13 | vim.fn.getchar() |
| 14 | os.exit(1) | 14 | os.exit(1) |
| 15 | end | 15 | end |
| 16 | end | 16 | end |
| 17 | vim.opt.rtp:prepend(lazypath) | 17 | vim.opt.rtp:prepend(lazypath) |
| 18 | 18 | ||
| 19 | require("lazy").setup({ | 19 | require("lazy").setup({ |
| 20 | spec = { | 20 | spec = { |
| 21 | { import = "plugins" }, | 21 | { import = "plugins" }, |
| 22 | }, | 22 | }, |
| 23 | checker = { | 23 | checker = { |
| 24 | enabled = true, | 24 | enabled = true, |
| 25 | notify = false, | 25 | notify = false, |
| 26 | frequency = 86400, -- Sekunden (1 Tag) | 26 | frequency = 86400, -- Sekunden (1 Tag) |
| 27 | log = true, | 27 | log = true, |
| 28 | }, | 28 | }, |
| 29 | rocks = { | 29 | rocks = { |
| 30 | enabled = false, | 30 | enabled = false, |
| 31 | }, | 31 | }, |
| 32 | }) | 32 | }) |
diff --git a/nvim/lua/config/statusline.lua b/nvim/lua/config/statusline.lua index 8a9c75a..3a6f1c7 100644 --- a/nvim/lua/config/statusline.lua +++ b/nvim/lua/config/statusline.lua | |||
| @@ -1,182 +1,182 @@ | |||
| 1 | local M = {} | 1 | local M = {} |
| 2 | 2 | ||
| 3 | local modes = { | 3 | local modes = { |
| 4 | n = { "NORMAL", "StatuslineModeNormal" }, | 4 | n = { "NORMAL", "StatuslineModeNormal" }, |
| 5 | i = { "INSERT", "StatuslineModeInsert" }, | 5 | i = { "INSERT", "StatuslineModeInsert" }, |
| 6 | v = { "VISUAL", "StatuslineModeVisual" }, | 6 | v = { "VISUAL", "StatuslineModeVisual" }, |
| 7 | V = { "V-LINE", "StatuslineModeVisual" }, | 7 | V = { "V-LINE", "StatuslineModeVisual" }, |
| 8 | [""] = { "V-BLOCK", "StatuslineModeVisual" }, | 8 | [""] = { "V-BLOCK", "StatuslineModeVisual" }, |
| 9 | R = { "REPLACE", "StatuslineModeReplace" }, | 9 | R = { "REPLACE", "StatuslineModeReplace" }, |
| 10 | c = { "COMMAND", "StatuslineModeCommand" }, | 10 | c = { "COMMAND", "StatuslineModeCommand" }, |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | local function mode() | 13 | local function mode() |
| 14 | local m = vim.fn.mode() | 14 | local m = vim.fn.mode() |
| 15 | local entry = modes[m] or { m, "StatusLine" } | 15 | local entry = modes[m] or { m, "StatusLine" } |
| 16 | return string.format("%%#%s# %s %%#StatusLine#", entry[2], entry[1]) | 16 | return string.format("%%#%s# %s %%#StatusLine#", entry[2], entry[1]) |
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | ---------------------------------------------------------------------- | 19 | ---------------------------------------------------------------------- |
| 20 | -- Git branch (buffer-lokal, gecached, kein redraw-spam) | 20 | -- Git branch (buffer-lokal, gecached, kein redraw-spam) |
| 21 | ---------------------------------------------------------------------- | 21 | ---------------------------------------------------------------------- |
| 22 | 22 | ||
| 23 | -- /dev/null gibt es unter Windows nicht (cmd.exe versteht das nicht als | 23 | -- /dev/null gibt es unter Windows nicht (cmd.exe versteht das nicht als |
| 24 | -- Pfad und meldet "Das System kann den angegebenen Pfad nicht finden"). | 24 | -- Pfad und meldet "Das System kann den angegebenen Pfad nicht finden"). |
| 25 | local devnull = vim.fn.has("win32") == 1 and "NUL" or "/dev/null" | 25 | local devnull = vim.fn.has("win32") == 1 and "NUL" or "/dev/null" |
| 26 | 26 | ||
| 27 | local function update_git_branch(bufnr) | 27 | local function update_git_branch(bufnr) |
| 28 | bufnr = bufnr or 0 | 28 | bufnr = bufnr or 0 |
| 29 | 29 | ||
| 30 | -- nur in echten Dateien | 30 | -- nur in echten Dateien |
| 31 | if vim.bo[bufnr].buftype ~= "" then | 31 | if vim.bo[bufnr].buftype ~= "" then |
| 32 | vim.b[bufnr].git_branch = "" | 32 | vim.b[bufnr].git_branch = "" |
| 33 | return | 33 | return |
| 34 | end | 34 | end |
| 35 | 35 | ||
| 36 | -- kein Git → nichts tun | 36 | -- kein Git → nichts tun |
| 37 | if vim.fn.executable("git") ~= 1 then | 37 | if vim.fn.executable("git") ~= 1 then |
| 38 | vim.b[bufnr].git_branch = "" | 38 | vim.b[bufnr].git_branch = "" |
| 39 | return | 39 | return |
| 40 | end | 40 | end |
| 41 | 41 | ||
| 42 | local branch = vim.fn.systemlist("git rev-parse --abbrev-ref HEAD 2>" .. devnull)[1] | 42 | local branch = vim.fn.systemlist("git rev-parse --abbrev-ref HEAD 2>" .. devnull)[1] |
| 43 | if branch then | 43 | if branch then |
| 44 | -- unter Windows bleibt an systemlist()-Zeilen mitunter ein | 44 | -- unter Windows bleibt an systemlist()-Zeilen mitunter ein |
| 45 | -- trailing \r haengen (^M in der Statuszeile sichtbar) | 45 | -- trailing \r haengen (^M in der Statuszeile sichtbar) |
| 46 | branch = branch:gsub("\r$", "") | 46 | branch = branch:gsub("\r$", "") |
| 47 | end | 47 | end |
| 48 | 48 | ||
| 49 | if branch and branch ~= "" then | 49 | if branch and branch ~= "" then |
| 50 | vim.b[bufnr].git_branch = " " .. branch .. " " | 50 | vim.b[bufnr].git_branch = " " .. branch .. " " |
| 51 | else | 51 | else |
| 52 | vim.b[bufnr].git_branch = "" | 52 | vim.b[bufnr].git_branch = "" |
| 53 | end | 53 | end |
| 54 | end | 54 | end |
| 55 | 55 | ||
| 56 | ---------------------------------------------------------------------- | 56 | ---------------------------------------------------------------------- |
| 57 | -- Autocmd: Git nur bei Bedarf aktualisieren | 57 | -- Autocmd: Git nur bei Bedarf aktualisieren |
| 58 | ---------------------------------------------------------------------- | 58 | ---------------------------------------------------------------------- |
| 59 | 59 | ||
| 60 | vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained" }, { | 60 | vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained" }, { |
| 61 | callback = function(args) | 61 | callback = function(args) |
| 62 | update_git_branch(args.buf) | 62 | update_git_branch(args.buf) |
| 63 | end, | 63 | end, |
| 64 | }) | 64 | }) |
| 65 | 65 | ||
| 66 | ---------------------------------------------------------------------- | 66 | ---------------------------------------------------------------------- |
| 67 | -- Statusline-Sektionen (reine Darstellung, keine IO) | 67 | -- Statusline-Sektionen (reine Darstellung, keine IO) |
| 68 | ---------------------------------------------------------------------- | 68 | ---------------------------------------------------------------------- |
| 69 | 69 | ||
| 70 | -- Git-Branch (buffer-lokal, gecached, kein redraw-spam) | 70 | -- Git-Branch (buffer-lokal, gecached, kein redraw-spam) |
| 71 | 71 | ||
| 72 | local function git() | 72 | local function git() |
| 73 | return vim.b.git_branch or "" | 73 | return vim.b.git_branch or "" |
| 74 | end | 74 | end |
| 75 | 75 | ||
| 76 | -- Git-Diff (buffer-lokal, kein redraw-spam) | 76 | -- Git-Diff (buffer-lokal, kein redraw-spam) |
| 77 | 77 | ||
| 78 | local function git_diff() | 78 | local function git_diff() |
| 79 | local gsd = vim.b.gitsigns_status_dict | 79 | local gsd = vim.b.gitsigns_status_dict |
| 80 | if not gsd then return "" end | 80 | if not gsd then return "" end |
| 81 | 81 | ||
| 82 | local parts = {} | 82 | local parts = {} |
| 83 | if gsd.added and gsd.added > 0 then table.insert(parts, "+" .. gsd.added) end | 83 | if gsd.added and gsd.added > 0 then table.insert(parts, "+" .. gsd.added) end |
| 84 | if gsd.changed and gsd.changed > 0 then table.insert(parts, "~" .. gsd.changed) end | 84 | if gsd.changed and gsd.changed > 0 then table.insert(parts, "~" .. gsd.changed) end |
| 85 | if gsd.removed and gsd.removed > 0 then table.insert(parts, "-" .. gsd.removed) end | 85 | if gsd.removed and gsd.removed > 0 then table.insert(parts, "-" .. gsd.removed) end |
| 86 | 86 | ||
| 87 | if #parts > 0 then return " " .. table.concat(parts, " ") .. " " end | 87 | if #parts > 0 then return " " .. table.concat(parts, " ") .. " " end |
| 88 | 88 | ||
| 89 | return "" | 89 | return "" |
| 90 | end | 90 | end |
| 91 | 91 | ||
| 92 | ---------------------------------------------------------------------- | 92 | ---------------------------------------------------------------------- |
| 93 | -- Dateiname mit Modifikationsstatus | 93 | -- Dateiname mit Modifikationsstatus |
| 94 | ---------------------------------------------------------------------- | 94 | ---------------------------------------------------------------------- |
| 95 | 95 | ||
| 96 | local function filename() | 96 | local function filename() |
| 97 | local name = vim.fn.expand("%:.") | 97 | local name = vim.fn.expand("%:.") |
| 98 | if name == "" then name = "[No Name]" end | 98 | if name == "" then name = "[No Name]" end |
| 99 | 99 | ||
| 100 | if vim.bo.modified then name = name .. " [+]" end | 100 | if vim.bo.modified then name = name .. " [+]" end |
| 101 | 101 | ||
| 102 | return " " .. name .. " " | 102 | return " " .. name .. " " |
| 103 | end | 103 | end |
| 104 | 104 | ||
| 105 | ------------------------------------------------------------------------ | 105 | ------------------------------------------------------------------------ |
| 106 | -- Treesitter-Aktivität (buffer-lokal, kein redraw-spam) | 106 | -- Treesitter-Aktivität (buffer-lokal, kein redraw-spam) |
| 107 | ------------------------------------------------------------------------ | 107 | ------------------------------------------------------------------------ |
| 108 | 108 | ||
| 109 | local function treesitter() | 109 | local function treesitter() |
| 110 | local ok = vim.treesitter.highlighter.active[vim.api.nvim_get_current_buf()] | 110 | local ok = vim.treesitter.highlighter.active[vim.api.nvim_get_current_buf()] |
| 111 | if ok then return " 🌳 " end | 111 | if ok then return " 🌳 " end |
| 112 | return "" | 112 | return "" |
| 113 | end | 113 | end |
| 114 | 114 | ||
| 115 | ------------------------------------------------------------------------ | 115 | ------------------------------------------------------------------------ |
| 116 | -- Diagnostik-Counts (buffer-lokal, kein redraw-spam) | 116 | -- Diagnostik-Counts (buffer-lokal, kein redraw-spam) |
| 117 | ------------------------------------------------------------------------ | 117 | ------------------------------------------------------------------------ |
| 118 | 118 | ||
| 119 | local function diagnostics() | 119 | local function diagnostics() |
| 120 | local counts = { | 120 | local counts = { |
| 121 | error = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }), | 121 | error = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }), |
| 122 | warn = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }), | 122 | warn = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }), |
| 123 | info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }), | 123 | info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }), |
| 124 | hint = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }), | 124 | hint = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }), |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | local parts = {} | 127 | local parts = {} |
| 128 | 128 | ||
| 129 | if counts.error > 0 then table.insert(parts, " " .. counts.error) end | 129 | if counts.error > 0 then table.insert(parts, " " .. counts.error) end |
| 130 | if counts.warn > 0 then table.insert(parts, " " .. counts.warn) end | 130 | if counts.warn > 0 then table.insert(parts, " " .. counts.warn) end |
| 131 | if counts.info > 0 then table.insert(parts, " " .. counts.info) end | 131 | if counts.info > 0 then table.insert(parts, " " .. counts.info) end |
| 132 | if counts.hint > 0 then table.insert(parts, " " .. counts.hint) end | 132 | if counts.hint > 0 then table.insert(parts, " " .. counts.hint) end |
| 133 | 133 | ||
| 134 | if #parts > 0 then return " " .. table.concat(parts, " ") .. " " end | 134 | if #parts > 0 then return " " .. table.concat(parts, " ") .. " " end |
| 135 | 135 | ||
| 136 | return "" | 136 | return "" |
| 137 | end | 137 | end |
| 138 | 138 | ||
| 139 | ------------------------------------------------------------------------ | 139 | ------------------------------------------------------------------------ |
| 140 | -- Filetype & Encoding (buffer-lokal, kein redraw-spam) | 140 | -- Filetype & Encoding (buffer-lokal, kein redraw-spam) |
| 141 | ------------------------------------------------------------------------ | 141 | ------------------------------------------------------------------------ |
| 142 | 142 | ||
| 143 | local function fileinfo() | 143 | local function fileinfo() |
| 144 | local ft = vim.bo.filetype ~= "" and vim.bo.filetype or "none" | 144 | local ft = vim.bo.filetype ~= "" and vim.bo.filetype or "none" |
| 145 | local enc = vim.bo.fileencoding ~= "" and vim.bo.fileencoding or vim.o.encoding | 145 | local enc = vim.bo.fileencoding ~= "" and vim.bo.fileencoding or vim.o.encoding |
| 146 | return string.format(" %s %s ", ft, enc) | 146 | return string.format(" %s %s ", ft, enc) |
| 147 | end | 147 | end |
| 148 | 148 | ||
| 149 | ------------------------------------------------------------------------ | 149 | ------------------------------------------------------------------------ |
| 150 | -- Cursor-Position (kein redraw-spam) | 150 | -- Cursor-Position (kein redraw-spam) |
| 151 | ------------------------------------------------------------------------ | 151 | ------------------------------------------------------------------------ |
| 152 | 152 | ||
| 153 | local function position() | 153 | local function position() |
| 154 | return string.format(" %d:%d ", vim.fn.line("."), vim.fn.col(".")) | 154 | return string.format(" %d:%d ", vim.fn.line("."), vim.fn.col(".")) |
| 155 | end | 155 | end |
| 156 | 156 | ||
| 157 | ---------------------------------------------------------------------- | 157 | ---------------------------------------------------------------------- |
| 158 | -- Öffentliche Statusline-Funktion | 158 | -- Öffentliche Statusline-Funktion |
| 159 | ---------------------------------------------------------------------- | 159 | ---------------------------------------------------------------------- |
| 160 | 160 | ||
| 161 | function M.statusline() | 161 | function M.statusline() |
| 162 | return table.concat({ | 162 | return table.concat({ |
| 163 | -- LEFT: Mode & Context | 163 | -- LEFT: Mode & Context |
| 164 | mode(), | 164 | mode(), |
| 165 | "%#PmenuSel#", | 165 | "%#PmenuSel#", |
| 166 | git(), | 166 | git(), |
| 167 | git_diff(), | 167 | git_diff(), |
| 168 | "%#StatusLine#", | 168 | "%#StatusLine#", |
| 169 | filename(), | 169 | filename(), |
| 170 | 170 | ||
| 171 | "%=", | 171 | "%=", |
| 172 | 172 | ||
| 173 | -- RIGHT: Feedback & Meta | 173 | -- RIGHT: Feedback & Meta |
| 174 | diagnostics(), | 174 | diagnostics(), |
| 175 | treesitter(), | 175 | treesitter(), |
| 176 | fileinfo(), | 176 | fileinfo(), |
| 177 | " %p%% ", | 177 | " %p%% ", |
| 178 | position(), | 178 | position(), |
| 179 | }) | 179 | }) |
| 180 | end | 180 | end |
| 181 | 181 | ||
| 182 | return M | 182 | return M |
diff --git a/nvim/lua/config/treesitter.lua b/nvim/lua/config/treesitter.lua index 1eee267..d900e41 100644 --- a/nvim/lua/config/treesitter.lua +++ b/nvim/lua/config/treesitter.lua | |||
| @@ -1,28 +1,28 @@ | |||
| 1 | local M = {} | 1 | local M = {} |
| 2 | 2 | ||
| 3 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main/SUPPORTED_LANGUAGES.md | 3 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main/SUPPORTED_LANGUAGES.md |
| 4 | M.languages = { | 4 | M.languages = { |
| 5 | "bash", | 5 | "bash", |
| 6 | "c", | 6 | "c", |
| 7 | "cpp", | 7 | "cpp", |
| 8 | "html", | 8 | "html", |
| 9 | "javascript", | 9 | "javascript", |
| 10 | "jq", | 10 | "jq", |
| 11 | "json", | 11 | "json", |
| 12 | "lua", | 12 | "lua", |
| 13 | "make", | 13 | "make", |
| 14 | "markdown", | 14 | "markdown", |
| 15 | "markdown_inline", | 15 | "markdown_inline", |
| 16 | "po", | 16 | "po", |
| 17 | "powershell", | 17 | "powershell", |
| 18 | "prisma", | 18 | "prisma", |
| 19 | "python", | 19 | "python", |
| 20 | "typescript", | 20 | "typescript", |
| 21 | "vim", | 21 | "vim", |
| 22 | "vimdoc", | 22 | "vimdoc", |
| 23 | "xml", | 23 | "xml", |
| 24 | "yaml", | 24 | "yaml", |
| 25 | "zsh", | 25 | "zsh", |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | return M | 28 | return M |
diff --git a/nvim/lua/plugins/completion.lua b/nvim/lua/plugins/completion.lua index 4912815..6e20d73 100644 --- a/nvim/lua/plugins/completion.lua +++ b/nvim/lua/plugins/completion.lua | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | return { | 1 | return { |
| 2 | { | 2 | { |
| 3 | "saghen/blink.cmp", | 3 | "saghen/blink.cmp", |
| 4 | dependencies = { "rafamadriz/friendly-snippets" }, | 4 | dependencies = { "rafamadriz/friendly-snippets" }, |
| 5 | version = "1.*", | 5 | version = "1.*", |
| 6 | 6 | ||
| 7 | opts = { | 7 | opts = { |
| 8 | keymap = { preset = "default" }, | 8 | keymap = { preset = "default" }, |
| 9 | 9 | ||
| 10 | appearance = { | 10 | appearance = { |
| 11 | use_nvim_cmp_as_default = true, | 11 | use_nvim_cmp_as_default = true, |
| 12 | nerd_font_variant = "mono", | 12 | nerd_font_variant = "mono", |
| 13 | }, | 13 | }, |
| 14 | 14 | ||
| 15 | completion = { | 15 | completion = { |
| 16 | documentation = { | 16 | documentation = { |
| 17 | auto_show = false, | 17 | auto_show = false, |
| 18 | window = { | 18 | window = { |
| 19 | border = "rounded", | 19 | border = "rounded", |
| 20 | }, | 20 | }, |
| 21 | }, | 21 | }, |
| 22 | 22 | ||
| 23 | menu = { | 23 | menu = { |
| 24 | border = "rounded", | 24 | border = "rounded", |
| 25 | }, | 25 | }, |
| 26 | }, | 26 | }, |
| 27 | 27 | ||
| 28 | signature = { | 28 | signature = { |
| 29 | enabled = true, | 29 | enabled = true, |
| 30 | window = { | 30 | window = { |
| 31 | border = "rounded", | 31 | border = "rounded", |
| 32 | }, | 32 | }, |
| 33 | }, | 33 | }, |
| 34 | 34 | ||
| 35 | sources = { | 35 | sources = { |
| 36 | default = { "lsp", "path", "snippets", "buffer" }, | 36 | default = { "lsp", "path", "snippets", "buffer" }, |
| 37 | }, | 37 | }, |
| 38 | 38 | ||
| 39 | fuzzy = { | 39 | fuzzy = { |
| 40 | implementation = "prefer_rust_with_warning", | 40 | implementation = "prefer_rust_with_warning", |
| 41 | }, | 41 | }, |
| 42 | }, | 42 | }, |
| 43 | 43 | ||
| 44 | opts_extend = { "sources.default" }, | 44 | opts_extend = { "sources.default" }, |
| 45 | }, | 45 | }, |
| 46 | } | 46 | } |
diff --git a/nvim/lua/plugins/editing.lua b/nvim/lua/plugins/editing.lua index b9f9283..38e651c 100644 --- a/nvim/lua/plugins/editing.lua +++ b/nvim/lua/plugins/editing.lua | |||
| @@ -1,32 +1,32 @@ | |||
| 1 | return { | 1 | return { |
| 2 | { | 2 | { |
| 3 | "tpope/vim-repeat", | 3 | "tpope/vim-repeat", |
| 4 | event = "VeryLazy", | 4 | event = "VeryLazy", |
| 5 | }, | 5 | }, |
| 6 | 6 | ||
| 7 | { | 7 | { |
| 8 | "tpope/vim-surround", -- alternative: "kylechui/nvim-surround" | 8 | "tpope/vim-surround", -- alternative: "kylechui/nvim-surround" |
| 9 | event = "VeryLazy", | 9 | event = "VeryLazy", |
| 10 | }, | 10 | }, |
| 11 | 11 | ||
| 12 | { | 12 | { |
| 13 | "romainl/vim-cool", | 13 | "romainl/vim-cool", |
| 14 | event = "VeryLazy", | 14 | event = "VeryLazy", |
| 15 | }, | 15 | }, |
| 16 | 16 | ||
| 17 | { | 17 | { |
| 18 | "windwp/nvim-autopairs", | 18 | "windwp/nvim-autopairs", |
| 19 | event = "InsertEnter", | 19 | event = "InsertEnter", |
| 20 | config = true, | 20 | config = true, |
| 21 | }, | 21 | }, |
| 22 | 22 | ||
| 23 | { | 23 | { |
| 24 | "windwp/nvim-ts-autotag", | 24 | "windwp/nvim-ts-autotag", |
| 25 | event = "InsertEnter", | 25 | event = "InsertEnter", |
| 26 | }, | 26 | }, |
| 27 | 27 | ||
| 28 | { | 28 | { |
| 29 | "preservim/vim-markdown", | 29 | "preservim/vim-markdown", |
| 30 | ft = "markdown", | 30 | ft = "markdown", |
| 31 | }, | 31 | }, |
| 32 | } | 32 | } |
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua index 8ca7f1b..102326c 100644 --- a/nvim/lua/plugins/format.lua +++ b/nvim/lua/plugins/format.lua | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | -- Verfügbare Formater: https://github.com/stevearc/conform.nvim/tree/master/lua/conform/formatters | 1 | -- Verfügbare Formater: https://github.com/stevearc/conform.nvim/tree/master/lua/conform/formatters |
| 2 | 2 | ||
| 3 | local clang = {} | 3 | local clang = {} |
| 4 | local gawk = { "gawk" } -- brew install gawk, pkg install gawk | 4 | local gawk = { "gawk" } -- brew install gawk, pkg install gawk |
| 5 | local jq = { "jq" } -- brew install jq, pkg install jq | 5 | local jq = { "jq" } -- brew install jq, pkg install jq |
| 6 | local prettier = { "prettier" } -- npm install -g prettier | 6 | local prettier = { "prettier" } -- npm install -g prettier |
| 7 | local ruff = { "ruff_format" } -- brew install ruff, pkg install ruff | 7 | local ruff = { "ruff_format" } -- brew install ruff, pkg install ruff |
| 8 | local shfmt = { "shfmt" } -- brew install shfmt, pkg install shfmt | 8 | local shfmt = { "shfmt" } -- brew install shfmt, pkg install shfmt |
| 9 | local stylua = { "stylua" } -- brew install stylua, pkg install stylua | 9 | local stylua = { "stylua" } -- brew install stylua, pkg install stylua |
| 10 | local xmllint = { "xmllint" } -- xmllint ist Teil von libxml2 (standardmäßig installiert unter MacOS; pkg install libxml2) | 10 | local xmllint = { "xmllint" } -- xmllint ist Teil von libxml2 (standardmäßig installiert unter MacOS; pkg install libxml2) |
| 11 | local yamlfmt = { "yamlfmt" } -- brew install yamlfmt, pkg install yamlfmt | 11 | local yamlfmt = { "yamlfmt" } -- brew install yamlfmt, pkg install yamlfmt |
| 12 | 12 | ||
| 13 | return { | 13 | return { |
| 14 | "stevearc/conform.nvim", | 14 | "stevearc/conform.nvim", |
| 15 | event = { "BufReadPre", "BufNewFile" }, | 15 | event = { "BufReadPre", "BufNewFile" }, |
| 16 | keys = { | 16 | keys = { |
| 17 | { | 17 | { |
| 18 | "<leader>cf", | 18 | "<leader>cf", |
| 19 | function() | 19 | function() |
| 20 | require("conform").format({ async = true }) | 20 | require("conform").format({ async = true }) |
| 21 | end, | 21 | end, |
| 22 | desc = "Format file", | 22 | desc = "Format file", |
| 23 | }, | 23 | }, |
| 24 | }, | 24 | }, |
| 25 | opts = { | 25 | opts = { |
| 26 | formatters_by_ft = { | 26 | formatters_by_ft = { |
| 27 | awk = gawk, | 27 | awk = gawk, |
| 28 | bash = shfmt, | 28 | bash = shfmt, |
| 29 | c = clang, | 29 | c = clang, |
| 30 | cpp = clang, | 30 | cpp = clang, |
| 31 | html = prettier, | 31 | html = prettier, |
| 32 | javascript = prettier, | 32 | javascript = prettier, |
| 33 | json = jq, | 33 | json = jq, |
| 34 | lua = stylua, | 34 | lua = stylua, |
| 35 | python = ruff, | 35 | python = ruff, |
| 36 | sh = shfmt, | 36 | sh = shfmt, |
| 37 | typescript = prettier, | 37 | typescript = prettier, |
| 38 | xml = xmllint, | 38 | xml = xmllint, |
| 39 | xsd = xmllint, | 39 | xsd = xmllint, |
| 40 | yaml = yamlfmt, | 40 | yaml = yamlfmt, |
| 41 | }, | 41 | }, |
| 42 | default_format_opts = { | 42 | default_format_opts = { |
| 43 | lsp_format = "fallback", | 43 | lsp_format = "fallback", |
| 44 | }, | 44 | }, |
| 45 | }, | 45 | }, |
| 46 | } | 46 | } |
diff --git a/nvim/lua/plugins/git.lua b/nvim/lua/plugins/git.lua index ed7bafe..37d5ee3 100644 --- a/nvim/lua/plugins/git.lua +++ b/nvim/lua/plugins/git.lua | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | return { | 1 | return { |
| 2 | { | 2 | { |
| 3 | "lewis6991/gitsigns.nvim", | 3 | "lewis6991/gitsigns.nvim", |
| 4 | event = { "BufReadPre", "BufNewFile" }, | 4 | event = { "BufReadPre", "BufNewFile" }, |
| 5 | opts = { | 5 | opts = { |
| 6 | current_line_blame = true, | 6 | current_line_blame = true, |
| 7 | current_line_blame_opts = { | 7 | current_line_blame_opts = { |
| 8 | delay = 250, | 8 | delay = 250, |
| 9 | }, | 9 | }, |
| 10 | }, | 10 | }, |
| 11 | config = function(_, opts) | 11 | config = function(_, opts) |
| 12 | require("gitsigns").setup(opts) | 12 | require("gitsigns").setup(opts) |
| 13 | require("config.keymaps").gitsigns() | 13 | require("config.keymaps").gitsigns() |
| 14 | end, | 14 | end, |
| 15 | }, | 15 | }, |
| 16 | } | 16 | } |
diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index b301b68..812ed24 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua | |||
| @@ -1,124 +1,124 @@ | |||
| 1 | return { | 1 | return { |
| 2 | { | 2 | { |
| 3 | "neovim/nvim-lspconfig", | 3 | "neovim/nvim-lspconfig", |
| 4 | dependencies = { "saghen/blink.cmp" }, | 4 | dependencies = { "saghen/blink.cmp" }, |
| 5 | lazy = false, | 5 | lazy = false, |
| 6 | config = function() | 6 | config = function() |
| 7 | local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) | 7 | local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) |
| 8 | 8 | ||
| 9 | vim.lsp.config.lua_ls = { | 9 | vim.lsp.config.lua_ls = { |
| 10 | capabilities = capabilities, | 10 | capabilities = capabilities, |
| 11 | settings = { | 11 | settings = { |
| 12 | Lua = { | 12 | Lua = { |
| 13 | runtime = { | 13 | runtime = { |
| 14 | version = "LuaJIT", | 14 | version = "LuaJIT", |
| 15 | }, | 15 | }, |
| 16 | diagnostics = { | 16 | diagnostics = { |
| 17 | globals = { "vim" }, | 17 | globals = { "vim" }, |
| 18 | }, | 18 | }, |
| 19 | workspace = { | 19 | workspace = { |
| 20 | checkThirdParty = false, | 20 | checkThirdParty = false, |
| 21 | library = { | 21 | library = { |
| 22 | vim.env.VIMRUNTIME .. "/lua", | 22 | vim.env.VIMRUNTIME .. "/lua", |
| 23 | vim.fn.stdpath("config") .. "/lua", | 23 | vim.fn.stdpath("config") .. "/lua", |
| 24 | }, | 24 | }, |
| 25 | }, | 25 | }, |
| 26 | telemetry = { | 26 | telemetry = { |
| 27 | enable = false, | 27 | enable = false, |
| 28 | }, | 28 | }, |
| 29 | }, | 29 | }, |
| 30 | }, | 30 | }, |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | vim.lsp.config.bashls = { | 33 | vim.lsp.config.bashls = { |
| 34 | capabilities = capabilities, | 34 | capabilities = capabilities, |
| 35 | filetypes = { "sh", "bash" }, | 35 | filetypes = { "sh", "bash" }, |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | vim.lsp.config.clangd = { | 38 | vim.lsp.config.clangd = { |
| 39 | capabilities = capabilities, | 39 | capabilities = capabilities, |
| 40 | cmd = { | 40 | cmd = { |
| 41 | "clangd", | 41 | "clangd", |
| 42 | "--background-index", | 42 | "--background-index", |
| 43 | "--clang-tidy", | 43 | "--clang-tidy", |
| 44 | "--completion-style=detailed", | 44 | "--completion-style=detailed", |
| 45 | "--header-insertion=iwyu", | 45 | "--header-insertion=iwyu", |
| 46 | "--header-insertion-decorators", | 46 | "--header-insertion-decorators", |
| 47 | "--pch-storage=memory", | 47 | "--pch-storage=memory", |
| 48 | "--all-scopes-completion", | 48 | "--all-scopes-completion", |
| 49 | "--inlay-hints", | 49 | "--inlay-hints", |
| 50 | "--function-arg-placeholders", | 50 | "--function-arg-placeholders", |
| 51 | "--fallback-style=llvm", | 51 | "--fallback-style=llvm", |
| 52 | }, | 52 | }, |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | vim.lsp.config.prismals = { | 55 | vim.lsp.config.prismals = { |
| 56 | capabilities = capabilities, | 56 | capabilities = capabilities, |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | vim.lsp.config.jsonls = { | 59 | vim.lsp.config.jsonls = { |
| 60 | capabilities = capabilities, | 60 | capabilities = capabilities, |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | vim.lsp.config.html = { | 63 | vim.lsp.config.html = { |
| 64 | capabilities = capabilities, | 64 | capabilities = capabilities, |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | vim.lsp.config.vtsls = { | 67 | vim.lsp.config.vtsls = { |
| 68 | capabilities = capabilities, | 68 | capabilities = capabilities, |
| 69 | settings = { | 69 | settings = { |
| 70 | typescript = { | 70 | typescript = { |
| 71 | updateImportsOnFileMove = { enabled = "always" }, | 71 | updateImportsOnFileMove = { enabled = "always" }, |
| 72 | suggest = { | 72 | suggest = { |
| 73 | completeFunctionCalls = true, | 73 | completeFunctionCalls = true, |
| 74 | }, | 74 | }, |
| 75 | inlayHints = { | 75 | inlayHints = { |
| 76 | enumMemberValues = { enabled = true }, | 76 | enumMemberValues = { enabled = true }, |
| 77 | functionLikeReturnTypes = { enabled = true }, | 77 | functionLikeReturnTypes = { enabled = true }, |
| 78 | parameterNames = { enabled = "all" }, | 78 | parameterNames = { enabled = "all" }, |
| 79 | parameterTypes = { enabled = true }, | 79 | parameterTypes = { enabled = true }, |
| 80 | propertyDeclarationTypes = { enabled = true }, | 80 | propertyDeclarationTypes = { enabled = true }, |
| 81 | variableTypes = { enabled = false }, | 81 | variableTypes = { enabled = false }, |
| 82 | }, | 82 | }, |
| 83 | }, | 83 | }, |
| 84 | javascript = { | 84 | javascript = { |
| 85 | suggest = { | 85 | suggest = { |
| 86 | completeFunctionCalls = true, | 86 | completeFunctionCalls = true, |
| 87 | }, | 87 | }, |
| 88 | inlayHints = { | 88 | inlayHints = { |
| 89 | parameterNames = { enabled = "all" }, | 89 | parameterNames = { enabled = "all" }, |
| 90 | }, | 90 | }, |
| 91 | }, | 91 | }, |
| 92 | }, | 92 | }, |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | vim.lsp.config.basedpyright = { | 95 | vim.lsp.config.basedpyright = { |
| 96 | capabilities = capabilities, | 96 | capabilities = capabilities, |
| 97 | settings = { | 97 | settings = { |
| 98 | basedpyright = { | 98 | basedpyright = { |
| 99 | analysis = { | 99 | analysis = { |
| 100 | diagnosticMode = "openFilesOnly", | 100 | diagnosticMode = "openFilesOnly", |
| 101 | inlayHints = { | 101 | inlayHints = { |
| 102 | callArgumentNames = true, | 102 | callArgumentNames = true, |
| 103 | }, | 103 | }, |
| 104 | typeCheckingMode = "basic", -- oder "strict" für strenger | 104 | typeCheckingMode = "basic", -- oder "strict" für strenger |
| 105 | autoSearchPaths = true, | 105 | autoSearchPaths = true, |
| 106 | useLibraryCodeForTypes = true, | 106 | useLibraryCodeForTypes = true, |
| 107 | }, | 107 | }, |
| 108 | }, | 108 | }, |
| 109 | }, | 109 | }, |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | vim.lsp.enable({ | 112 | vim.lsp.enable({ |
| 113 | "basedpyright", -- npm install -g basedpyright, brew install basedpyright | 113 | "basedpyright", -- npm install -g basedpyright, brew install basedpyright |
| 114 | "bashls", -- npm install -g bash-language-server, pkg install hs-ShellCheck | 114 | "bashls", -- npm install -g bash-language-server, pkg install hs-ShellCheck |
| 115 | "clangd", -- pkg install llvm | 115 | "clangd", -- pkg install llvm |
| 116 | "html", -- npm install -g vscode-langservers-extracted | 116 | "html", -- npm install -g vscode-langservers-extracted |
| 117 | "jsonls", -- npm install -g vscode-langservers-extracted | 117 | "jsonls", -- npm install -g vscode-langservers-extracted |
| 118 | "lua_ls", -- pkg install lua-language-server, brew install lua-language-server | 118 | "lua_ls", -- pkg install lua-language-server, brew install lua-language-server |
| 119 | "prismals", -- npm install -g @prisma/language-server | 119 | "prismals", -- npm install -g @prisma/language-server |
| 120 | "vtsls", -- npm install -g @vtsls/language-server | 120 | "vtsls", -- npm install -g @vtsls/language-server |
| 121 | }) | 121 | }) |
| 122 | end, | 122 | end, |
| 123 | }, | 123 | }, |
| 124 | } | 124 | } |
diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index d7fd279..d4e3fd3 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua | |||
| @@ -1,21 +1,21 @@ | |||
| 1 | return { | 1 | return { |
| 2 | { | 2 | { |
| 3 | "nvim-telescope/telescope.nvim", | 3 | "nvim-telescope/telescope.nvim", |
| 4 | dependencies = { | 4 | dependencies = { |
| 5 | "nvim-lua/plenary.nvim", | 5 | "nvim-lua/plenary.nvim", |
| 6 | }, | 6 | }, |
| 7 | lazy = true, | 7 | lazy = true, |
| 8 | opts = { | 8 | opts = { |
| 9 | defaults = { | 9 | defaults = { |
| 10 | path_display = { "smart", "truncate" }, | 10 | path_display = { "smart", "truncate" }, |
| 11 | }, | 11 | }, |
| 12 | }, | 12 | }, |
| 13 | keys = { | 13 | keys = { |
| 14 | { "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" }, | 14 | { "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" }, |
| 15 | { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live grep" }, | 15 | { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live grep" }, |
| 16 | { "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" }, | 16 | { "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" }, |
| 17 | { "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help tags" }, | 17 | { "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help tags" }, |
| 18 | { "<leader>dd", "<cmd>Telescope diagnostics<cr>", desc = "Diagnostics" }, | 18 | { "<leader>dd", "<cmd>Telescope diagnostics<cr>", desc = "Diagnostics" }, |
| 19 | }, | 19 | }, |
| 20 | }, | 20 | }, |
| 21 | } | 21 | } |
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua index faa850a..954e05f 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/lua/plugins/treesitter.lua | |||
| @@ -1,22 +1,22 @@ | |||
| 1 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main/README.md | 1 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main/README.md |
| 2 | 2 | ||
| 3 | -- Stelle sicher, dass die TreeSitter-CLI installiert ist: | 3 | -- Stelle sicher, dass die TreeSitter-CLI installiert ist: |
| 4 | -- MacOS: `brew install tree-sitter-cli` | 4 | -- MacOS: `brew install tree-sitter-cli` |
| 5 | -- FreeBSD: `doas pkg install tree-sitter-cli` | 5 | -- FreeBSD: `doas pkg install tree-sitter-cli` |
| 6 | 6 | ||
| 7 | return { | 7 | return { |
| 8 | { | 8 | { |
| 9 | "nvim-treesitter/nvim-treesitter", | 9 | "nvim-treesitter/nvim-treesitter", |
| 10 | branch = "main", | 10 | branch = "main", |
| 11 | build = ":TSUpdate", | 11 | build = ":TSUpdate", |
| 12 | lazy = false, | 12 | lazy = false, |
| 13 | opts = {}, | 13 | opts = {}, |
| 14 | config = function(_, opts) | 14 | config = function(_, opts) |
| 15 | local treesitter = require("nvim-treesitter") | 15 | local treesitter = require("nvim-treesitter") |
| 16 | local langs = require("config.treesitter").languages | 16 | local langs = require("config.treesitter").languages |
| 17 | 17 | ||
| 18 | treesitter.setup(opts) | 18 | treesitter.setup(opts) |
| 19 | treesitter.install(langs) | 19 | treesitter.install(langs) |
| 20 | end, | 20 | end, |
| 21 | }, | 21 | }, |
| 22 | } | 22 | } |
diff --git a/nvim/stylua.toml b/nvim/stylua.toml index 28b83c7..133302c 100644 --- a/nvim/stylua.toml +++ b/nvim/stylua.toml | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | syntax = "All" | 1 | syntax = "All" |
| 2 | column_width = 120 | 2 | column_width = 120 |
| 3 | line_endings = "Unix" | 3 | line_endings = "Unix" |
| 4 | indent_type = "Spaces" | 4 | indent_type = "Spaces" |
| 5 | indent_width = 2 | 5 | indent_width = 2 |
| 6 | quote_style = "AutoPreferDouble" | 6 | quote_style = "AutoPreferDouble" |
| 7 | call_parentheses = "Always" | 7 | call_parentheses = "Always" |
| 8 | collapse_simple_statement = "ConditionalOnly" | 8 | collapse_simple_statement = "ConditionalOnly" |
| 9 | space_after_function_names = "Never" | 9 | space_after_function_names = "Never" |
| 10 | block_newline_gaps = "Never" | 10 | block_newline_gaps = "Never" |
| 11 | 11 | ||
| 12 | [sort_requires] | 12 | [sort_requires] |
| 13 | enabled = false | 13 | enabled = false |
| @@ -1,78 +1,78 @@ | |||
| 1 | # Dotfiles | 1 | # Dotfiles |
| 2 | 2 | ||
| 3 | My personal dotfiles for macOS, FreeBSD and Windows (Beta). | 3 | My personal dotfiles for macOS, FreeBSD and Windows (Beta). |
| 4 | 4 | ||
| 5 | ## Setup | 5 | ## Setup |
| 6 | 6 | ||
| 7 | ### macOS / FreeBSD | 7 | ### macOS / FreeBSD |
| 8 | 8 | ||
| 9 | Create the symbolic links: | 9 | Create the symbolic links: |
| 10 | 10 | ||
| 11 | ```sh | 11 | ```sh |
| 12 | ./install.sh | 12 | ./install.sh |
| 13 | ``` | 13 | ``` |
| 14 | 14 | ||
| 15 | Bootstrap the Neovim environment: | 15 | Bootstrap the Neovim environment: |
| 16 | 16 | ||
| 17 | ```sh | 17 | ```sh |
| 18 | ./bootstrap/neovim.sh | 18 | ./bootstrap/neovim.sh |
| 19 | ./bootstrap/neovim-dict.sh | 19 | ./bootstrap/neovim-dict.sh |
| 20 | ``` | 20 | ``` |
| 21 | 21 | ||
| 22 | Bootstrap the zsh environment: | 22 | Bootstrap the zsh environment: |
| 23 | 23 | ||
| 24 | ```sh | 24 | ```sh |
| 25 | ./bootstrap/zsh.sh | 25 | ./bootstrap/zsh.sh |
| 26 | ``` | 26 | ``` |
| 27 | 27 | ||
| 28 | Bootstrap the git environment: | 28 | Bootstrap the git environment: |
| 29 | 29 | ||
| 30 | ```sh | 30 | ```sh |
| 31 | ./bootstrap/git.sh | 31 | ./bootstrap/git.sh |
| 32 | ``` | 32 | ``` |
| 33 | 33 | ||
| 34 | ### Windows | 34 | ### Windows |
| 35 | 35 | ||
| 36 | Native PowerShell, no WSL/Git Bash required: | 36 | Native PowerShell, no WSL/Git Bash required: |
| 37 | 37 | ||
| 38 | ```powershell | 38 | ```powershell |
| 39 | .\install-win.ps1 | 39 | .\install-win.ps1 |
| 40 | .\bootstrap-win\git.ps1 | 40 | .\bootstrap-win\git.ps1 |
| 41 | .\bootstrap-win\neovim.ps1 | 41 | .\bootstrap-win\neovim.ps1 |
| 42 | .\bootstrap-win\neovim-dict.ps1 | 42 | .\bootstrap-win\neovim-dict.ps1 |
| 43 | ``` | 43 | ``` |
| 44 | 44 | ||
| 45 | See [neovim-windows-setup.md](neovim-windows-setup.md) for prerequisites (execution policy, MSVC Developer PowerShell for `nvim-treesitter`, ...) and known caveats. | 45 | See [neovim-windows-setup.md](neovim-windows-setup.md) for prerequisites (execution policy, MSVC Developer PowerShell for `nvim-treesitter`, ...) and known caveats. |
| 46 | 46 | ||
| 47 | ## Included configuration | 47 | ## Included configuration |
| 48 | 48 | ||
| 49 | - [abook] | 49 | - [abook] |
| 50 | - [gdb] | 50 | - [gdb] |
| 51 | - [git] | 51 | - [git] |
| 52 | - [mpd] & [ncmpcpp] | 52 | - [mpd] & [ncmpcpp] |
| 53 | - [newsboat] | 53 | - [newsboat] |
| 54 | - [nvi] | 54 | - [nvi] |
| 55 | - [npm] | 55 | - [npm] |
| 56 | - [neovim] | 56 | - [neovim] |
| 57 | - [tmux] | 57 | - [tmux] |
| 58 | - [vit] & [taskwarrior] | 58 | - [vit] & [taskwarrior] |
| 59 | - [wyrd] & [remind] | 59 | - [wyrd] & [remind] |
| 60 | - [X11] | 60 | - [X11] |
| 61 | - [zsh] | 61 | - [zsh] |
| 62 | 62 | ||
| 63 | [abook]: https://abook.sourceforge.io/ | 63 | [abook]: https://abook.sourceforge.io/ |
| 64 | [gdb]: https://sourceware.org/gdb/ | 64 | [gdb]: https://sourceware.org/gdb/ |
| 65 | [git]: https://git-scm.com/ | 65 | [git]: https://git-scm.com/ |
| 66 | [mpd]: https://www.musicpd.org/ | 66 | [mpd]: https://www.musicpd.org/ |
| 67 | [ncmpcpp]: https://github.com/ncmpcpp/ncmpcpp | 67 | [ncmpcpp]: https://github.com/ncmpcpp/ncmpcpp |
| 68 | [newsboat]: https://newsboat.org/ | 68 | [newsboat]: https://newsboat.org/ |
| 69 | [nvi]: https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page | 69 | [nvi]: https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page |
| 70 | [npm]: https://www.npmjs.com/ | 70 | [npm]: https://www.npmjs.com/ |
| 71 | [neovim]: https://neovim.io/ | 71 | [neovim]: https://neovim.io/ |
| 72 | [taskwarrior]: https://taskwarrior.org/ | 72 | [taskwarrior]: https://taskwarrior.org/ |
| 73 | [tmux]: https://github.com/tmux/tmux/wiki | 73 | [tmux]: https://github.com/tmux/tmux/wiki |
| 74 | [vit]: https://github.com/vit-project/vit | 74 | [vit]: https://github.com/vit-project/vit |
| 75 | [wyrd]: https://wyrd-calendar.gitlab.io/wyrd/ | 75 | [wyrd]: https://wyrd-calendar.gitlab.io/wyrd/ |
| 76 | [remind]: https://dianne.skoll.ca/projects/remind/ | 76 | [remind]: https://dianne.skoll.ca/projects/remind/ |
| 77 | [X11]: https://www.x.org/ | 77 | [X11]: https://www.x.org/ |
| 78 | [zsh]: https://www.zsh.org/ | 78 | [zsh]: https://www.zsh.org/ |
diff --git a/taskwarrior/taskrc b/taskwarrior/taskrc index 3588c10..3a7d6d0 100644 --- a/taskwarrior/taskrc +++ b/taskwarrior/taskrc | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | # vim: filetype=dosini | 1 | # vim: filetype=dosini |
| 2 | 2 | ||
| 3 | # [Created by task 2.6.2 4/16/2023 10:58:10] | 3 | # [Created by task 2.6.2 4/16/2023 10:58:10] |
| 4 | # Taskwarrior program configuration file. | 4 | # Taskwarrior program configuration file. |
| 5 | # For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color', | 5 | # For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color', |
| 6 | # 'man task-sync' or 'man taskrc' | 6 | # 'man task-sync' or 'man taskrc' |
| 7 | 7 | ||
| 8 | # Here is an example of entries that use the default, override and blank values | 8 | # Here is an example of entries that use the default, override and blank values |
| 9 | # variable=foo -- By specifying a value, this overrides the default | 9 | # variable=foo -- By specifying a value, this overrides the default |
| 10 | # variable= -- By specifying no value, this means no default | 10 | # variable= -- By specifying no value, this means no default |
| 11 | # #variable=foo -- By commenting out the line, or deleting it, this uses the default | 11 | # #variable=foo -- By commenting out the line, or deleting it, this uses the default |
| 12 | 12 | ||
| 13 | # You can also refence environment variables: | 13 | # You can also refence environment variables: |
| 14 | # variable=$HOME/task | 14 | # variable=$HOME/task |
| 15 | # variable=$VALUE | 15 | # variable=$VALUE |
| 16 | 16 | ||
| 17 | # Use the command 'task show' to see all defaults and overrides | 17 | # Use the command 'task show' to see all defaults and overrides |
| 18 | 18 | ||
| 19 | # Files | 19 | # Files |
| 20 | data.location=~/.task | 20 | data.location=~/.task |
| 21 | weekstart=Monday | 21 | weekstart=Monday |
| 22 | color=1 | 22 | color=1 |
| 23 | 23 | ||
| 24 | # To use the default location of the XDG directories, | 24 | # To use the default location of the XDG directories, |
| 25 | # move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below | 25 | # move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below |
| 26 | 26 | ||
| 27 | #data.location=~/.local/share/task | 27 | #data.location=~/.local/share/task |
| 28 | #hooks.location=~/.config/task/hooks | 28 | #hooks.location=~/.config/task/hooks |
| 29 | 29 | ||
| 30 | # Color theme (uncomment one to use) | 30 | # Color theme (uncomment one to use) |
| 31 | #include light-16.theme | 31 | #include light-16.theme |
| 32 | #include light-256.theme | 32 | #include light-256.theme |
| 33 | #include dark-16.theme | 33 | #include dark-16.theme |
| 34 | #include dark-256.theme | 34 | #include dark-256.theme |
| 35 | #include dark-red-256.theme | 35 | #include dark-red-256.theme |
| 36 | #include dark-green-256.theme | 36 | #include dark-green-256.theme |
| 37 | #include dark-blue-256.theme | 37 | #include dark-blue-256.theme |
| 38 | #include dark-violets-256.theme | 38 | #include dark-violets-256.theme |
| 39 | #include dark-yellow-green.theme | 39 | #include dark-yellow-green.theme |
| 40 | #include dark-gray-256.theme | 40 | #include dark-gray-256.theme |
| 41 | include dark-gray-blue-256.theme | 41 | include dark-gray-blue-256.theme |
| 42 | #include solarized-dark-256.theme | 42 | #include solarized-dark-256.theme |
| 43 | #include solarized-light-256.theme | 43 | #include solarized-light-256.theme |
| 44 | #include no-color.theme | 44 | #include no-color.theme |
| 45 | 45 | ||
| 46 | news.version=2.6.0 | 46 | news.version=2.6.0 |
diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 8a9fa3b..fdb063b 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf | |||
| @@ -1,32 +1,32 @@ | |||
| 1 | set -g mouse on | 1 | set -g mouse on |
| 2 | set -g default-terminal "tmux-256color" | 2 | set -g default-terminal "tmux-256color" |
| 3 | set -g terminal-features ",xterm*:RGB" | 3 | set -g terminal-features ",xterm*:RGB" |
| 4 | set -g terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' | 4 | set -g terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' |
| 5 | set -g status on | 5 | set -g status on |
| 6 | set -g status-left " #[fg=darkblue]#S#[fg=black] | " | 6 | set -g status-left " #[fg=darkblue]#S#[fg=black] | " |
| 7 | set -g status-left-length 20 | 7 | set -g status-left-length 20 |
| 8 | set -g status-right "#[fg=black] | #[fg=darkblue]%H:%M " | 8 | set -g status-right "#[fg=black] | #[fg=darkblue]%H:%M " |
| 9 | set -g status-right-length 35 | 9 | set -g status-right-length 35 |
| 10 | set -g status-interval 30 | 10 | set -g status-interval 30 |
| 11 | set -g base-index 1 | 11 | set -g base-index 1 |
| 12 | set -g pane-base-index 1 | 12 | set -g pane-base-index 1 |
| 13 | set -g renumber-windows on | 13 | set -g renumber-windows on |
| 14 | set -g history-limit 10000 | 14 | set -g history-limit 10000 |
| 15 | set -g escape-time 0 | 15 | set -g escape-time 0 |
| 16 | set -g aggressive-resize on | 16 | set -g aggressive-resize on |
| 17 | set -g window-status-style fg=black,bg=green,bold | 17 | set -g window-status-style fg=black,bg=green,bold |
| 18 | set -g window-status-current-style fg=white,bg=brightblue,bold | 18 | set -g window-status-current-style fg=white,bg=brightblue,bold |
| 19 | set -g mode-keys vi | 19 | set -g mode-keys vi |
| 20 | set -g focus-events on | 20 | set -g focus-events on |
| 21 | 21 | ||
| 22 | bind h selectp -L | 22 | bind h selectp -L |
| 23 | bind j selectp -D | 23 | bind j selectp -D |
| 24 | bind k selectp -U | 24 | bind k selectp -U |
| 25 | bind l selectp -R | 25 | bind l selectp -R |
| 26 | 26 | ||
| 27 | bind m set -g mouse \; display "mouse #{?mouse,ON,OFF}" | 27 | bind m set -g mouse \; display "mouse #{?mouse,ON,OFF}" |
| 28 | bind C-t set -g status | 28 | bind C-t set -g status |
| 29 | bind r source ~/.config/tmux/tmux.conf \; display-message "configuration reloaded" | 29 | bind r source ~/.config/tmux/tmux.conf \; display-message "configuration reloaded" |
| 30 | 30 | ||
| 31 | bind % splitw -h -c "#{pane_current_path}" | 31 | bind % splitw -h -c "#{pane_current_path}" |
| 32 | bind '"' splitw -c "#{pane_current_path}" | 32 | bind '"' splitw -c "#{pane_current_path}" |
diff --git a/vit/config.ini b/vit/config.ini index 70e7bee..62cfbb4 100644 --- a/vit/config.ini +++ b/vit/config.ini | |||
| @@ -1,256 +1,256 @@ | |||
| 1 | # This is the user configuration file for VIT. | 1 | # This is the user configuration file for VIT. |
| 2 | 2 | ||
| 3 | # All configuration options are listed here, commented out, and showing their | 3 | # All configuration options are listed here, commented out, and showing their |
| 4 | # default value when not otherwise set. | 4 | # default value when not otherwise set. |
| 5 | 5 | ||
| 6 | # The format is standard INI file format. Configuration sections are enclosed | 6 | # The format is standard INI file format. Configuration sections are enclosed |
| 7 | # by brackets. Configuration values should be placed in their relevant section, | 7 | # by brackets. Configuration values should be placed in their relevant section, |
| 8 | # using a 'name = value' format. Boolean values can be expressed by the | 8 | # using a 'name = value' format. Boolean values can be expressed by the |
| 9 | # following: | 9 | # following: |
| 10 | # True values: 1, yes, true (case insensitive) | 10 | # True values: 1, yes, true (case insensitive) |
| 11 | # False values: All other values. | 11 | # False values: All other values. |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | [taskwarrior] | 14 | [taskwarrior] |
| 15 | 15 | ||
| 16 | # Full path to the Taskwarrior configuration file. Tilde will be expanded to | 16 | # Full path to the Taskwarrior configuration file. Tilde will be expanded to |
| 17 | # the user's home directory. | 17 | # the user's home directory. |
| 18 | # NOTE: This setting is overridden by the TASKRC environment variable. | 18 | # NOTE: This setting is overridden by the TASKRC environment variable. |
| 19 | #taskrc = ~/.taskrc | 19 | #taskrc = ~/.taskrc |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | [vit] | 22 | [vit] |
| 23 | 23 | ||
| 24 | # The keybinding map to use. This maps actions registered with VIT to be fired | 24 | # The keybinding map to use. This maps actions registered with VIT to be fired |
| 25 | # when the user presses the specific keys configured in the keybindings file. | 25 | # when the user presses the specific keys configured in the keybindings file. |
| 26 | # Possible keybindings are in the 'keybinding' directory, and the setting's | 26 | # Possible keybindings are in the 'keybinding' directory, and the setting's |
| 27 | # value should be the filename minus the .ini extension. The default keybinding | 27 | # value should be the filename minus the .ini extension. The default keybinding |
| 28 | # configuration is modeled heavily on the legacy VIT keybindings, and inspired | 28 | # configuration is modeled heavily on the legacy VIT keybindings, and inspired |
| 29 | # by vi/vim. | 29 | # by vi/vim. |
| 30 | #default_keybindings = vi | 30 | #default_keybindings = vi |
| 31 | 31 | ||
| 32 | # The theme to use. This allows control over the colors used in the | 32 | # The theme to use. This allows control over the colors used in the |
| 33 | # application itself. Possible themes are in the 'theme' directory, and the | 33 | # application itself. Possible themes are in the 'theme' directory, and the |
| 34 | # setting's value should be the filename minus the .py extension. | 34 | # setting's value should be the filename minus the .py extension. |
| 35 | # Note that the theme does not control any coloring related to tasks -- this | 35 | # Note that the theme does not control any coloring related to tasks -- this |
| 36 | # is controlled via the color settings in the Taskwarrior configuration. | 36 | # is controlled via the color settings in the Taskwarrior configuration. |
| 37 | #theme = default | 37 | #theme = default |
| 38 | 38 | ||
| 39 | # Boolean. If true, VIT will ask for confirmation before marking a task as done, | 39 | # Boolean. If true, VIT will ask for confirmation before marking a task as done, |
| 40 | # deleting a task, or quitting VIT. Set to false to disable the prompts. | 40 | # deleting a task, or quitting VIT. Set to false to disable the prompts. |
| 41 | confirmation = False | 41 | confirmation = False |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | # Boolean. If true, VIT will show the output of the task command and wait for | 44 | # Boolean. If true, VIT will show the output of the task command and wait for |
| 45 | # enter. If false, VIT will not show output of the task command after | 45 | # enter. If false, VIT will not show output of the task command after |
| 46 | # modifications to a task are made. | 46 | # modifications to a task are made. |
| 47 | wait = False | 47 | wait = False |
| 48 | 48 | ||
| 49 | # Boolean. If true, VIT will enable mouse support for actions such as selecting | 49 | # Boolean. If true, VIT will enable mouse support for actions such as selecting |
| 50 | # list items. | 50 | # list items. |
| 51 | #mouse = False | 51 | #mouse = False |
| 52 | 52 | ||
| 53 | # Boolean. If true, hitting backspace against an empty prompt aborts the prompt. | 53 | # Boolean. If true, hitting backspace against an empty prompt aborts the prompt. |
| 54 | #abort_backspace = False | 54 | #abort_backspace = False |
| 55 | 55 | ||
| 56 | # Boolean. If true, VIT will focus on the newly added task. Note: the new task must be | 56 | # Boolean. If true, VIT will focus on the newly added task. Note: the new task must be |
| 57 | #included in the active filter for this setting to have effect. | 57 | #included in the active filter for this setting to have effect. |
| 58 | focus_on_add = True | 58 | focus_on_add = True |
| 59 | 59 | ||
| 60 | # Path to a directory to manage pid files for running instances of VIT. | 60 | # Path to a directory to manage pid files for running instances of VIT. |
| 61 | # If no path is provided, no pid files will be managed. | 61 | # If no path is provided, no pid files will be managed. |
| 62 | # The special token $UID may be used, and will be substituted with the user ID | 62 | # The special token $UID may be used, and will be substituted with the user ID |
| 63 | # of the user starting VIT. | 63 | # of the user starting VIT. |
| 64 | # VIT can be run with the '--list-pids' argument, which will output a list of | 64 | # VIT can be run with the '--list-pids' argument, which will output a list of |
| 65 | # all pids in pid_dir; useful for sending signals to the running processes. | 65 | # all pids in pid_dir; useful for sending signals to the running processes. |
| 66 | # If you use this feature, it's suggested to choose a directory that is | 66 | # If you use this feature, it's suggested to choose a directory that is |
| 67 | # automatically cleaned on boot, e.g.: | 67 | # automatically cleaned on boot, e.g.: |
| 68 | # /var/run/user/$UID/vit | 68 | # /var/run/user/$UID/vit |
| 69 | # /tmp/vit_pids | 69 | # /tmp/vit_pids |
| 70 | #pid_dir = | 70 | #pid_dir = |
| 71 | 71 | ||
| 72 | # Int. The number of flash repetitions focusing on the edit made | 72 | # Int. The number of flash repetitions focusing on the edit made |
| 73 | #flash_focus_repeat_times = 2 | 73 | #flash_focus_repeat_times = 2 |
| 74 | 74 | ||
| 75 | # Float. Waiting time for the blink focusing on the edit made | 75 | # Float. Waiting time for the blink focusing on the edit made |
| 76 | #flash_focus_pause_seconds = 0.1 | 76 | #flash_focus_pause_seconds = 0.1 |
| 77 | 77 | ||
| 78 | [report] | 78 | [report] |
| 79 | 79 | ||
| 80 | # The default Taskwarrior report to load when VIT first starts, if no report | 80 | # The default Taskwarrior report to load when VIT first starts, if no report |
| 81 | # or filters are passed at the command line. | 81 | # or filters are passed at the command line. |
| 82 | #default_report = next | 82 | #default_report = next |
| 83 | 83 | ||
| 84 | # The default Taskwarrior report to load when VIT first starts, if filters are | 84 | # The default Taskwarrior report to load when VIT first starts, if filters are |
| 85 | # passed at the command line with no report. | 85 | # passed at the command line with no report. |
| 86 | #default_filter_only_report = next | 86 | #default_filter_only_report = next |
| 87 | 87 | ||
| 88 | # Boolean. If true, reports with the primary sort of project ascending will | 88 | # Boolean. If true, reports with the primary sort of project ascending will |
| 89 | # indent subprojects. If you use deeply nested subprojects, you'll probably | 89 | # indent subprojects. If you use deeply nested subprojects, you'll probably |
| 90 | # like this setting. | 90 | # like this setting. |
| 91 | #indent_subprojects = True | 91 | #indent_subprojects = True |
| 92 | 92 | ||
| 93 | # Boolean. If true, display report rows with alternating background colors. | 93 | # Boolean. If true, display report rows with alternating background colors. |
| 94 | #row_striping = True | 94 | #row_striping = True |
| 95 | 95 | ||
| 96 | 96 | ||
| 97 | [marker] | 97 | [marker] |
| 98 | 98 | ||
| 99 | # Boolean. Enables markers. Markers are configurable labels that appear on the | 99 | # Boolean. Enables markers. Markers are configurable labels that appear on the |
| 100 | # left side of a report to indicate information about a task when the displayed | 100 | # left side of a report to indicate information about a task when the displayed |
| 101 | # report does not contain the related column. | 101 | # report does not contain the related column. |
| 102 | # For example, let's suppose you have a 'notes' UDA configured. You'd like to | 102 | # For example, let's suppose you have a 'notes' UDA configured. You'd like to |
| 103 | # see some indication that a task has a note, without displaying the full note | 103 | # see some indication that a task has a note, without displaying the full note |
| 104 | # column in reports. You could configure a marker for that custom UDA as | 104 | # column in reports. You could configure a marker for that custom UDA as |
| 105 | # follows: | 105 | # follows: |
| 106 | # uda.notes.label = (N) | 106 | # uda.notes.label = (N) |
| 107 | # Then, when a listed task has a note associated with it, you'll see the | 107 | # Then, when a listed task has a note associated with it, you'll see the |
| 108 | # marker '(N)' displayed in the leftmost column of any report that displays the | 108 | # marker '(N)' displayed in the leftmost column of any report that displays the |
| 109 | # task in question. | 109 | # task in question. |
| 110 | #enabled = True | 110 | #enabled = True |
| 111 | 111 | ||
| 112 | # What columns to generate markers for. Can either be 'all' for all columns, or | 112 | # What columns to generate markers for. Can either be 'all' for all columns, or |
| 113 | # a comma separated list of columns to enable markers for. Possible columns | 113 | # a comma separated list of columns to enable markers for. Possible columns |
| 114 | # are: | 114 | # are: |
| 115 | # depends,description,due,project,recur,scheduled,start,status,tags,until | 115 | # depends,description,due,project,recur,scheduled,start,status,tags,until |
| 116 | #columns = all | 116 | #columns = all |
| 117 | 117 | ||
| 118 | # The header label for the markers column when it is displayed. | 118 | # The header label for the markers column when it is displayed. |
| 119 | #header_label = | 119 | #header_label = |
| 120 | 120 | ||
| 121 | # Boolean. If true, an associated color value must be configured in the | 121 | # Boolean. If true, an associated color value must be configured in the |
| 122 | # Taskwarrior configuration in order for the marker to be displayed. If false, | 122 | # Taskwarrior configuration in order for the marker to be displayed. If false, |
| 123 | # and no Taskwarrior color configuration is present for the matching marker, | 123 | # and no Taskwarrior color configuration is present for the matching marker, |
| 124 | # then it is not displayed. | 124 | # then it is not displayed. |
| 125 | # For example, if this is set to True, then for the above-mentioned 'notes' | 125 | # For example, if this is set to True, then for the above-mentioned 'notes' |
| 126 | # marker to be displayed, a matching Taskwarrior color configuration for the | 126 | # marker to be displayed, a matching Taskwarrior color configuration for the |
| 127 | # 'notes' UDA must be present, e.g.: | 127 | # 'notes' UDA must be present, e.g.: |
| 128 | # color.uda.notes=yellow | 128 | # color.uda.notes=yellow |
| 129 | #require_color = True | 129 | #require_color = True |
| 130 | 130 | ||
| 131 | # Boolean. If true, subprojects of a project will also display the configured | 131 | # Boolean. If true, subprojects of a project will also display the configured |
| 132 | # root project's marker, if the subproject itself does not have its own marker | 132 | # root project's marker, if the subproject itself does not have its own marker |
| 133 | # configured. | 133 | # configured. |
| 134 | # For example, given the following projects: | 134 | # For example, given the following projects: |
| 135 | # Foo | 135 | # Foo |
| 136 | # Foo.Bar | 136 | # Foo.Bar |
| 137 | # If this value is set to True, and the Foo project has a configured marker, | 137 | # If this value is set to True, and the Foo project has a configured marker, |
| 138 | # then Foo.Bar would also display Foo's marker. | 138 | # then Foo.Bar would also display Foo's marker. |
| 139 | #include_subprojects = True | 139 | #include_subprojects = True |
| 140 | 140 | ||
| 141 | # Below are listed all of the available markers, with their default label. | 141 | # Below are listed all of the available markers, with their default label. |
| 142 | # To disable a specific marker, set its label to empty. Any section enclosed | 142 | # To disable a specific marker, set its label to empty. Any section enclosed |
| 143 | # in brackets should be replaced by the appropriate identifier, eg. | 143 | # in brackets should be replaced by the appropriate identifier, eg. |
| 144 | # [project_name] with the actual name of a project. | 144 | # [project_name] with the actual name of a project. |
| 145 | #active.label = (A) | 145 | #active.label = (A) |
| 146 | #blocked.label = (BD) | 146 | #blocked.label = (BD) |
| 147 | #blocking.label = (BG) | 147 | #blocking.label = (BG) |
| 148 | #completed.label = (C) | 148 | #completed.label = (C) |
| 149 | #deleted.label = (X) | 149 | #deleted.label = (X) |
| 150 | #due.label = (D) | 150 | #due.label = (D) |
| 151 | #due.today.label = (DT) | 151 | #due.today.label = (DT) |
| 152 | #keyword.label = (K) | 152 | #keyword.label = (K) |
| 153 | #keyword.[keyword_name].label = | 153 | #keyword.[keyword_name].label = |
| 154 | #overdue.label = (OD) | 154 | #overdue.label = (OD) |
| 155 | #project.label = (P) | 155 | #project.label = (P) |
| 156 | #project.none.label = | 156 | #project.none.label = |
| 157 | #project.[project_name].label = | 157 | #project.[project_name].label = |
| 158 | #recurring.label = (R) | 158 | #recurring.label = (R) |
| 159 | #scheduled.label = (S) | 159 | #scheduled.label = (S) |
| 160 | #tag.label = (T) | 160 | #tag.label = (T) |
| 161 | #tag.none.label = | 161 | #tag.none.label = |
| 162 | #tag.[tag_name].label = | 162 | #tag.[tag_name].label = |
| 163 | #uda.label = | 163 | #uda.label = |
| 164 | #uda.priority.label = (PR) | 164 | #uda.priority.label = (PR) |
| 165 | #uda.[uda_name].label = | 165 | #uda.[uda_name].label = |
| 166 | 166 | ||
| 167 | 167 | ||
| 168 | [color] | 168 | [color] |
| 169 | 169 | ||
| 170 | # Boolean. If true, use the colors in Taskwarrior's configuration to colorize | 170 | # Boolean. If true, use the colors in Taskwarrior's configuration to colorize |
| 171 | # reports. Note that VIT uses a fundamentally different paradigm for | 171 | # reports. Note that VIT uses a fundamentally different paradigm for |
| 172 | # colorization, which combines tying coloring to associated report columns in | 172 | # colorization, which combines tying coloring to associated report columns in |
| 173 | # combination with markers (see above). This setting works independently of | 173 | # combination with markers (see above). This setting works independently of |
| 174 | # Taskwarriors 'color' config setting. | 174 | # Taskwarriors 'color' config setting. |
| 175 | #enabled = True | 175 | #enabled = True |
| 176 | 176 | ||
| 177 | # Boolean. If true, subprojects of a project will also display the configured | 177 | # Boolean. If true, subprojects of a project will also display the configured |
| 178 | # root project's color, if the subproject itself does not have its own color | 178 | # root project's color, if the subproject itself does not have its own color |
| 179 | # configured. | 179 | # configured. |
| 180 | # For example, given the following projects: | 180 | # For example, given the following projects: |
| 181 | # Foo | 181 | # Foo |
| 182 | # Foo.Bar | 182 | # Foo.Bar |
| 183 | # If this value is set to True, and the Foo project has a configured color, | 183 | # If this value is set to True, and the Foo project has a configured color, |
| 184 | # then Foo.Bar would also display Foo's color. | 184 | # then Foo.Bar would also display Foo's color. |
| 185 | #include_subprojects = True | 185 | #include_subprojects = True |
| 186 | 186 | ||
| 187 | # For the Taskwarrior color configuration, there are three special values: | 187 | # For the Taskwarrior color configuration, there are three special values: |
| 188 | # color.project.none | 188 | # color.project.none |
| 189 | # color.tag.none | 189 | # color.tag.none |
| 190 | # color.uda.[uda_name].none | 190 | # color.uda.[uda_name].none |
| 191 | # If any of these are configured for color, then the label below will be used | 191 | # If any of these are configured for color, then the label below will be used |
| 192 | # in the related column to display the color configuration. | 192 | # in the related column to display the color configuration. |
| 193 | #none_label = [NONE] | 193 | #none_label = [NONE] |
| 194 | 194 | ||
| 195 | 195 | ||
| 196 | [keybinding] | 196 | [keybinding] |
| 197 | 197 | ||
| 198 | # This section allows you to override the configured keybindings, associate | 198 | # This section allows you to override the configured keybindings, associate |
| 199 | # additional keybindings with VIT actions, and set up macros triggered by a | 199 | # additional keybindings with VIT actions, and set up macros triggered by a |
| 200 | # keybinding. | 200 | # keybinding. |
| 201 | 201 | ||
| 202 | # Meta keys are enclosed in angle brackets, variables are enclosed in curly | 202 | # Meta keys are enclosed in angle brackets, variables are enclosed in curly |
| 203 | # brackets. Keybindings here can either be: | 203 | # brackets. Keybindings here can either be: |
| 204 | # - Associated with a single VIT action | 204 | # - Associated with a single VIT action |
| 205 | # - A macro that describes a series of key presses to replay | 205 | # - A macro that describes a series of key presses to replay |
| 206 | 206 | ||
| 207 | # For VIT actions, the form is: | 207 | # For VIT actions, the form is: |
| 208 | # keys[,keys] = {ACTION_NAME} | 208 | # keys[,keys] = {ACTION_NAME} |
| 209 | # For example, to associate the keybinding 'zz' with the undo action: | 209 | # For example, to associate the keybinding 'zz' with the undo action: |
| 210 | # zz = {ACTION_TASK_UNDO} | 210 | # zz = {ACTION_TASK_UNDO} |
| 211 | # To only disable a keybinding, use the special noop action: | 211 | # To only disable a keybinding, use the special noop action: |
| 212 | # w = {ACTION_NOOP} | 212 | # w = {ACTION_NOOP} |
| 213 | # wa = {ACTION_TASK_WAIT} | 213 | # wa = {ACTION_TASK_WAIT} |
| 214 | # The above would disable the task wait action for the 'w' key, and instead | 214 | # The above would disable the task wait action for the 'w' key, and instead |
| 215 | # assign it to the 'wa' keybinding. | 215 | # assign it to the 'wa' keybinding. |
| 216 | # For capital letter keybindings, use the letter directly: | 216 | # For capital letter keybindings, use the letter directly: |
| 217 | # D = {ACTION_TASK_DONE} | 217 | # D = {ACTION_TASK_DONE} |
| 218 | 218 | ||
| 219 | # For a list of available actions, run 'vit --list-actions'. | 219 | # For a list of available actions, run 'vit --list-actions'. |
| 220 | # A great reference for many of the available meta keys, and understanding the | 220 | # A great reference for many of the available meta keys, and understanding the |
| 221 | # default keybindings is the 'keybinding/vi.ini' file. | 221 | # default keybindings is the 'keybinding/vi.ini' file. |
| 222 | 222 | ||
| 223 | # For macros, the form is: | 223 | # For macros, the form is: |
| 224 | # keys[,keys] = keypresses | 224 | # keys[,keys] = keypresses |
| 225 | # For example, to map the 'o' key to opening the OneNote script, passing it | 225 | # For example, to map the 'o' key to opening the OneNote script, passing it |
| 226 | # the currently focused task UUID: | 226 | # the currently focused task UUID: |
| 227 | # o = :!wr onenote {TASK_UUID}<Enter> | 227 | # o = :!wr onenote {TASK_UUID}<Enter> |
| 228 | 228 | ||
| 229 | # The special '{TASK_[attribute]}' variable can be used in any macro, and it | 229 | # The special '{TASK_[attribute]}' variable can be used in any macro, and it |
| 230 | # will be replaced with the value of the attribute for the currently | 230 | # will be replaced with the value of the attribute for the currently |
| 231 | # highlighted task. Any attribute listed in 'task _columns' is supported, e.g. | 231 | # highlighted task. Any attribute listed in 'task _columns' is supported, e.g. |
| 232 | # o = :!wr echo project is {TASK_PROJECT}<Enter> | 232 | # o = :!wr echo project is {TASK_PROJECT}<Enter> |
| 233 | 233 | ||
| 234 | # Multiple keybindings can be associated with the same action/macro, simply | 234 | # Multiple keybindings can be associated with the same action/macro, simply |
| 235 | # separate the keybindings with a comma: | 235 | # separate the keybindings with a comma: |
| 236 | # <Ctrl> z,zz = {ACTION_TASK_UNDO} | 236 | # <Ctrl> z,zz = {ACTION_TASK_UNDO} |
| 237 | 237 | ||
| 238 | # 'Special' keys are indicated by enclosing them in brackets. VIT supports the | 238 | # 'Special' keys are indicated by enclosing them in brackets. VIT supports the |
| 239 | # following special keys on either side of the keybinding declaration, by | 239 | # following special keys on either side of the keybinding declaration, by |
| 240 | # internally translating them into the single character: | 240 | # internally translating them into the single character: |
| 241 | # | 241 | # |
| 242 | # <Colon> | 242 | # <Colon> |
| 243 | # <Equals> | 243 | # <Equals> |
| 244 | # <Space> | 244 | # <Space> |
| 245 | # <Semicolon> | 245 | # <Semicolon> |
| 246 | # | 246 | # |
| 247 | # Under the hood, VIT uses the Urwid mappings for keyboard input: | 247 | # Under the hood, VIT uses the Urwid mappings for keyboard input: |
| 248 | # http://urwid.org/manual/userinput.html | 248 | # http://urwid.org/manual/userinput.html |
| 249 | # | 249 | # |
| 250 | # Any modifier, navigation, or function keys can be described in the VIT | 250 | # Any modifier, navigation, or function keys can be described in the VIT |
| 251 | # keybinding configuration by wrapping them in angle brackets, matching the | 251 | # keybinding configuration by wrapping them in angle brackets, matching the |
| 252 | # correct Urwid keyboard input structure: | 252 | # correct Urwid keyboard input structure: |
| 253 | # | 253 | # |
| 254 | # <Ctrl> e = :!wr echo do something | 254 | # <Ctrl> e = :!wr echo do something |
| 255 | # <Shift> <Ctrl> <F5> = :!wr echo you used a function key | 255 | # <Shift> <Ctrl> <F5> = :!wr echo you used a function key |
| 256 | 256 | ||
diff --git a/zsh/zprofile b/zsh/zprofile index 7fed3a7..3288e8d 100644 --- a/zsh/zprofile +++ b/zsh/zprofile | |||
| @@ -1,65 +1,65 @@ | |||
| 1 | # vim: filetype=zsh | 1 | # vim: filetype=zsh |
| 2 | 2 | ||
| 3 | if [[ ! -d "${HISTFILE:h}" ]]; then | 3 | if [[ ! -d "${HISTFILE:h}" ]]; then |
| 4 | mkdir -p "${HISTFILE:h}" | 4 | mkdir -p "${HISTFILE:h}" |
| 5 | fi | 5 | fi |
| 6 | 6 | ||
| 7 | add_path() { | 7 | add_path() { |
| 8 | if [[ -d "$1" ]]; then | 8 | if [[ -d "$1" ]]; then |
| 9 | path=("$1" $path) | 9 | path=("$1" $path) |
| 10 | fi | 10 | fi |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | set_include_lib_path() { | 13 | set_include_lib_path() { |
| 14 | # Fix für include/lib Verzeichnisse | 14 | # Fix für include/lib Verzeichnisse |
| 15 | # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html | 15 | # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html |
| 16 | export C_INCLUDE_PATH="$1/include:$C_INCLUDE_PATH" | 16 | export C_INCLUDE_PATH="$1/include:$C_INCLUDE_PATH" |
| 17 | export CPLUS_INCLUDE_PATH="$1/include:$CPLUS_INCLUDE_PATH" | 17 | export CPLUS_INCLUDE_PATH="$1/include:$CPLUS_INCLUDE_PATH" |
| 18 | export LIBRARY_PATH="$1/lib:$LIBRARY_PATH" | 18 | export LIBRARY_PATH="$1/lib:$LIBRARY_PATH" |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | add_path "$HOME/.cargo/bin" | 21 | add_path "$HOME/.cargo/bin" |
| 22 | add_path "$HOME/.local/bin" | 22 | add_path "$HOME/.local/bin" |
| 23 | 23 | ||
| 24 | case "$OSTYPE" in | 24 | case "$OSTYPE" in |
| 25 | darwin*) | 25 | darwin*) |
| 26 | add_path "/opt/homebrew/bin" | 26 | add_path "/opt/homebrew/bin" |
| 27 | 27 | ||
| 28 | set_include_lib_path "/opt/homebrew" | 28 | set_include_lib_path "/opt/homebrew" |
| 29 | ;; | 29 | ;; |
| 30 | freebsd*) | 30 | freebsd*) |
| 31 | texlive_prefix="$HOME/.local/texlive" | 31 | texlive_prefix="$HOME/.local/texlive" |
| 32 | 32 | ||
| 33 | if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then | 33 | if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then |
| 34 | add_path "$texlive_prefix/bin/amd64-freebsd" | 34 | add_path "$texlive_prefix/bin/amd64-freebsd" |
| 35 | 35 | ||
| 36 | export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" | 36 | export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" |
| 37 | export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" | 37 | export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" |
| 38 | fi | 38 | fi |
| 39 | 39 | ||
| 40 | set_include_lib_path "/usr/local" | 40 | set_include_lib_path "/usr/local" |
| 41 | ;; | 41 | ;; |
| 42 | esac | 42 | esac |
| 43 | 43 | ||
| 44 | # Fix Midnight Commander ESC Taste | 44 | # Fix Midnight Commander ESC Taste |
| 45 | # zusätzlich noch unter "F9 -> Optionen -> Konfiguration -> Escape Tastenmodus -> [x] Einzelner Tastendruck" aktivieren | 45 | # zusätzlich noch unter "F9 -> Optionen -> Konfiguration -> Escape Tastenmodus -> [x] Einzelner Tastendruck" aktivieren |
| 46 | export KEYBOARD_KEY_TIMEOUT_US=1000 | 46 | export KEYBOARD_KEY_TIMEOUT_US=1000 |
| 47 | 47 | ||
| 48 | # Tmuxp | 48 | # Tmuxp |
| 49 | # https://tmuxp.git-pull.com/configuration/environmental-variables.html | 49 | # https://tmuxp.git-pull.com/configuration/environmental-variables.html |
| 50 | export TMUXP_CONFIGDIR="$XDG_CONFIG_HOME/tmuxp" | 50 | export TMUXP_CONFIGDIR="$XDG_CONFIG_HOME/tmuxp" |
| 51 | 51 | ||
| 52 | # Vit (Taskwarrior UI) | 52 | # Vit (Taskwarrior UI) |
| 53 | # https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md | 53 | # https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md |
| 54 | export VIT_DIR="$XDG_CONFIG_HOME/vit" | 54 | export VIT_DIR="$XDG_CONFIG_HOME/vit" |
| 55 | 55 | ||
| 56 | # Maildir für mu (mail-utils) | 56 | # Maildir für mu (mail-utils) |
| 57 | export MAILDIR="$HOME/Mail" | 57 | export MAILDIR="$HOME/Mail" |
| 58 | 58 | ||
| 59 | # mpd starten | 59 | # mpd starten |
| 60 | if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then | 60 | if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then |
| 61 | /usr/local/bin/musicpd | 61 | /usr/local/bin/musicpd |
| 62 | fi | 62 | fi |
| 63 | 63 | ||
| 64 | unfunction add_path | 64 | unfunction add_path |
| 65 | unfunction set_include_lib_path | 65 | unfunction set_include_lib_path |
| @@ -1,13 +1,13 @@ | |||
| 1 | # vim: filetype=zsh | 1 | # vim: filetype=zsh |
| 2 | 2 | ||
| 3 | export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" | 3 | export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" |
| 4 | export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" | 4 | export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" |
| 5 | export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" | 5 | export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" |
| 6 | 6 | ||
| 7 | export EDITOR="nvim" | 7 | export EDITOR="nvim" |
| 8 | export VISUAL="nvim" | 8 | export VISUAL="nvim" |
| 9 | 9 | ||
| 10 | export HISTSIZE=10000 | 10 | export HISTSIZE=10000 |
| 11 | export SAVEHIST=10000 | 11 | export SAVEHIST=10000 |
| 12 | export HISTFILE="$XDG_DATA_HOME/zsh/history" | 12 | export HISTFILE="$XDG_DATA_HOME/zsh/history" |
| 13 | 13 | ||
| @@ -1,126 +1,126 @@ | |||
| 1 | # vim: filetype=zsh | 1 | # vim: filetype=zsh |
| 2 | 2 | ||
| 3 | # Hooks | 3 | # Hooks |
| 4 | chpwd() { | 4 | chpwd() { |
| 5 | if [[ -n "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then | 5 | if [[ -n "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then |
| 6 | local venv_dir="${VIRTUAL_ENV:h}" | 6 | local venv_dir="${VIRTUAL_ENV:h}" |
| 7 | if [[ "$PWD" != "$venv_dir"* ]] && (( $+functions[deactivate] )); then | 7 | if [[ "$PWD" != "$venv_dir"* ]] && (( $+functions[deactivate] )); then |
| 8 | deactivate | 8 | deactivate |
| 9 | fi | 9 | fi |
| 10 | fi | 10 | fi |
| 11 | 11 | ||
| 12 | for v in .venv venv .env; do | 12 | for v in .venv venv .env; do |
| 13 | if [[ -f "$v/bin/activate" ]]; then | 13 | if [[ -f "$v/bin/activate" ]]; then |
| 14 | . "$v/bin/activate" | 14 | . "$v/bin/activate" |
| 15 | break | 15 | break |
| 16 | fi | 16 | fi |
| 17 | done | 17 | done |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | # Funktionen | 20 | # Funktionen |
| 21 | source_if_exists() { | 21 | source_if_exists() { |
| 22 | if [[ -r "$1" ]]; then | 22 | if [[ -r "$1" ]]; then |
| 23 | . "$1" | 23 | . "$1" |
| 24 | fi | 24 | fi |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | # Optionen | 27 | # Optionen |
| 28 | setopt AUTO_PARAM_SLASH | 28 | setopt AUTO_PARAM_SLASH |
| 29 | unsetopt CASE_GLOB | 29 | unsetopt CASE_GLOB |
| 30 | setopt HIST_SAVE_NO_DUPS | 30 | setopt HIST_SAVE_NO_DUPS |
| 31 | setopt INC_APPEND_HISTORY | 31 | setopt INC_APPEND_HISTORY |
| 32 | setopt SHARE_HISTORY | 32 | setopt SHARE_HISTORY |
| 33 | setopt HIST_IGNORE_ALL_DUPS | 33 | setopt HIST_IGNORE_ALL_DUPS |
| 34 | setopt HIST_IGNORE_SPACE | 34 | setopt HIST_IGNORE_SPACE |
| 35 | 35 | ||
| 36 | source_if_exists "$HOME/.opam/opam-init/init.zsh" | 36 | source_if_exists "$HOME/.opam/opam-init/init.zsh" |
| 37 | 37 | ||
| 38 | case "$OSTYPE" in | 38 | case "$OSTYPE" in |
| 39 | darwin*) | 39 | darwin*) |
| 40 | source_if_exists "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | 40 | source_if_exists "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" |
| 41 | source_if_exists "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" | 41 | source_if_exists "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" |
| 42 | ;; | 42 | ;; |
| 43 | freebsd*) | 43 | freebsd*) |
| 44 | source_if_exists "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | 44 | source_if_exists "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" |
| 45 | source_if_exists "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" | 45 | source_if_exists "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" |
| 46 | ;; | 46 | ;; |
| 47 | esac | 47 | esac |
| 48 | 48 | ||
| 49 | if (( ${+ZSH_HIGHLIGHT_STYLES} )); then | 49 | if (( ${+ZSH_HIGHLIGHT_STYLES} )); then |
| 50 | ZSH_HIGHLIGHT_STYLES[path]='none' | 50 | ZSH_HIGHLIGHT_STYLES[path]='none' |
| 51 | ZSH_HIGHLIGHT_STYLES[path_prefix]='none' | 51 | ZSH_HIGHLIGHT_STYLES[path_prefix]='none' |
| 52 | fi | 52 | fi |
| 53 | 53 | ||
| 54 | bindkey -v | 54 | bindkey -v |
| 55 | export KEYTIMEOUT=1 | 55 | export KEYTIMEOUT=1 |
| 56 | 56 | ||
| 57 | # Keybindings | 57 | # Keybindings |
| 58 | zmodload zsh/complist | 58 | zmodload zsh/complist |
| 59 | bindkey -M menuselect 'h' vi-backward-char | 59 | bindkey -M menuselect 'h' vi-backward-char |
| 60 | bindkey -M menuselect 'k' vi-up-line-or-history | 60 | bindkey -M menuselect 'k' vi-up-line-or-history |
| 61 | bindkey -M menuselect 'l' vi-forward-char | 61 | bindkey -M menuselect 'l' vi-forward-char |
| 62 | bindkey -M menuselect 'j' vi-down-line-or-history | 62 | bindkey -M menuselect 'j' vi-down-line-or-history |
| 63 | 63 | ||
| 64 | autoload -Uz surround | 64 | autoload -Uz surround |
| 65 | zle -N delete-surround surround | 65 | zle -N delete-surround surround |
| 66 | zle -N add-surround surround | 66 | zle -N add-surround surround |
| 67 | zle -N change-surround surround | 67 | zle -N change-surround surround |
| 68 | bindkey -M vicmd cs change-surround | 68 | bindkey -M vicmd cs change-surround |
| 69 | bindkey -M vicmd ds delete-surround | 69 | bindkey -M vicmd ds delete-surround |
| 70 | bindkey -M vicmd ys add-surround | 70 | bindkey -M vicmd ys add-surround |
| 71 | bindkey -M visual S add-surround | 71 | bindkey -M visual S add-surround |
| 72 | 72 | ||
| 73 | bindkey '^A' vi-beginning-of-line | 73 | bindkey '^A' vi-beginning-of-line |
| 74 | bindkey '^E' vi-end-of-line | 74 | bindkey '^E' vi-end-of-line |
| 75 | 75 | ||
| 76 | # Aliase | 76 | # Aliase |
| 77 | alias mc='mc -u' | 77 | alias mc='mc -u' |
| 78 | alias gdb='gdb -q' | 78 | alias gdb='gdb -q' |
| 79 | alias pwgen='pwgen -s 48 1' | 79 | alias pwgen='pwgen -s 48 1' |
| 80 | alias ls='ls -G' | 80 | alias ls='ls -G' |
| 81 | 81 | ||
| 82 | # Funktionen | 82 | # Funktionen |
| 83 | nvim-update() { | 83 | nvim-update() { |
| 84 | nvim --headless \ | 84 | nvim --headless \ |
| 85 | -c "lua require[[lazy]].sync({ wait = true })" \ | 85 | -c "lua require[[lazy]].sync({ wait = true })" \ |
| 86 | -c "UpdateParsers" \ | 86 | -c "UpdateParsers" \ |
| 87 | -c "qa" | 87 | -c "qa" |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | # Command completion | 90 | # Command completion |
| 91 | autoload -U compinit | 91 | autoload -U compinit |
| 92 | compinit | 92 | compinit |
| 93 | _comp_options+=(globdots) # With hidden files | 93 | _comp_options+=(globdots) # With hidden files |
| 94 | 94 | ||
| 95 | # ... Angular CLI | 95 | # ... Angular CLI |
| 96 | if (( $+commands[ng] )); then | 96 | if (( $+commands[ng] )); then |
| 97 | . <(ng completion script) | 97 | . <(ng completion script) |
| 98 | fi | 98 | fi |
| 99 | 99 | ||
| 100 | zstyle ':completion:*' completer _extensions _complete _approximate | 100 | zstyle ':completion:*' completer _extensions _complete _approximate |
| 101 | 101 | ||
| 102 | zstyle ':completion:*' menu select | 102 | zstyle ':completion:*' menu select |
| 103 | 103 | ||
| 104 | zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' | 104 | zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f' |
| 105 | zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f' | 105 | zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f' |
| 106 | zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f' | 106 | zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f' |
| 107 | zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f' | 107 | zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f' |
| 108 | zstyle ':completion:*' group-name '' | 108 | zstyle ':completion:*' group-name '' |
| 109 | 109 | ||
| 110 | # Prompt | 110 | # Prompt |
| 111 | autoload -Uz vcs_info | 111 | autoload -Uz vcs_info |
| 112 | precmd_vcs_info() { vcs_info } | 112 | precmd_vcs_info() { vcs_info } |
| 113 | precmd_functions+=( precmd_vcs_info ) | 113 | precmd_functions+=( precmd_vcs_info ) |
| 114 | setopt prompt_subst | 114 | setopt prompt_subst |
| 115 | 115 | ||
| 116 | RPROMPT=\$vcs_info_msg_0_ | 116 | RPROMPT=\$vcs_info_msg_0_ |
| 117 | PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b ' | 117 | PROMPT=$'[%F{green}%8>..>%n%>>%F{white}@%F{green}%8>..>%m%>>%F{white}] %F{white}%(4~|.../%3~|%~) %B%F{blue}>%f%b ' |
| 118 | 118 | ||
| 119 | zstyle ':vcs_info:*' unstagedstr ' *' | 119 | zstyle ':vcs_info:*' unstagedstr ' *' |
| 120 | zstyle ':vcs_info:*' stagedstr ' +' | 120 | zstyle ':vcs_info:*' stagedstr ' +' |
| 121 | zstyle ':vcs_info:*' check-for-changes true | 121 | zstyle ':vcs_info:*' check-for-changes true |
| 122 | zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%a%u%c%F{3}|%F{1}%a%F{5}]%f' | 122 | zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%a%u%c%F{3}|%F{1}%a%F{5}]%f' |
| 123 | zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f' | 123 | zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%u%c%F{5}]%f' |
| 124 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' | 124 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' |
| 125 | 125 | ||
| 126 | unfunction source_if_exists | 126 | unfunction source_if_exists |
