Compare commits

...

17 commits

Author SHA1 Message Date
929f951391 [zsh] Move dotfiles config to XDG_CONFIG_HOME/dotfiles/home 2026-01-30 10:11:46 -08:00
b36b4ac390 [zsh] Define the XDG user directories 2026-01-30 10:11:20 -08:00
3669a7efc0 [fortune] Rename bare fortune file with .txt extension; rewrite Makefile as a bmake style Makefile 2026-01-30 09:57:56 -08:00
e188601053 [nvim] Update lsp config after deprecation of lspconfig module 2026-01-25 17:44:44 -08:00
a11355afc4 [mutt] Move muttrc to mutt/ 2026-01-25 17:44:09 -08:00
70712ad483 [tmux] Move config to tmux/ 2026-01-25 16:24:22 -08:00
dfd810e0b0 [emacs] Move emacs config to emacs/init.el
This file is symlinked to ~/.config/emacs
2026-01-25 16:23:56 -08:00
f462cf28a7 [zsh] Move ZSH init files to zsh/ 2026-01-24 16:22:22 -08:00
5b567ad2ad [nvim] Move neovim config to /nvim 2026-01-24 15:25:05 -08:00
e45c1694af [git] Move gitconfig and gitignore to git/ 2026-01-21 08:23:44 -08:00
d5f7b3e04c [git] Remove excludesfile directive
This setting has always been the default. Remove it so git just uses its internal
default.
2026-01-19 18:04:17 -08:00
1f088a1e8a [zsh] Remove init_zsh_functions -- no longer used 2026-01-19 11:29:34 -07:00
7c08c5131f [zsh] Move func/ directory to zsh/functions 2026-01-18 08:43:02 -07:00
91da2fc583 [zsh] A new env init function to set XDG path variables 2026-01-18 08:41:18 -07:00
4f06d80da6 [zsh] Use DOTFILES_HOME to find zsh functions inside the repo
Zsh can find shell functions inside the repo instead using a symlink in $HOME.
2026-01-18 08:08:00 -07:00
cbebbffee0 [zsh] Establish a DOTFILES_HOME variable
Look for a config file at ~/.config/dotfiles-home that contains the path to the
repo, or check the usual location of ~/.dotfiles.

Do this in a shell function in .zshenv so it's repeatable. This needs to be done
very early in the init process.
2026-01-18 08:05:33 -07:00
0d3b4a232f Replace vim with neovim in the README 2026-01-18 08:04:08 -07:00
91 changed files with 101 additions and 56 deletions

View file

@ -1,16 +1,15 @@
# Makefile
# Eryn Wells <eryn@erynwells.me>
STRFILE=strfile STRFILE != which strfile
DATFILES := eryn.dat
DATFILES=eryn.dat .SUFFIXES : .dat .txt
.PHONY: all clean .txt.dat :
$(STRFILE) $(.IMPSRC) $(.TARGET)
%.dat: %
$(STRFILE) $^ $@
.PHONY: all
all : $(DATFILES) all : $(DATFILES)
.PHONY: clean clean : .PHONY
clean:
rm -f $(DATFILES) rm -f $(DATFILES)

View file

@ -5,7 +5,8 @@ This is my collection of dotfiles, preserved here for all to see and enjoy. Feel
free to copy anything you see here. It would be nice if you added a comment free to copy anything you see here. It would be nice if you added a comment
mentioning where you got it. mentioning where you got it.
My environment relies on `zsh`, `vim`, and `git`. My environment relies on `zsh`, `neovim`, and `git`.
## Installation ## Installation

View file

@ -4,7 +4,6 @@
[core] [core]
editor = nvim editor = nvim
quotepath = false quotepath = false
excludesfile = ~/.gitignore
[color] [color]
ui = auto ui = auto
[alias] [alias]

View file

@ -19,9 +19,9 @@ set timeout=300
set imap_keepalive=300 set imap_keepalive=300
# Caching # Caching
set header_cache="~/.mutt/cache/headers" set header_cache="~/.cache/mutt/headers"
set message_cachedir="~/.mutt/cache/bodies" set message_cachedir="~/.cache/mutt/bodies"
set certificate_file="~/.mutt/certificates" set certificate_file="~/.cache/mutt/certificates"
set use_from=yes set use_from=yes
set envelope_from=yes set envelope_from=yes
@ -50,14 +50,14 @@ hdr_order Date: From: To: Cc: Subject:
# Aliases # Aliases
set reverse_alias=yes set reverse_alias=yes
set alias_file="~/.mutt/aliases" set alias_file="~/.config/mutt/aliases"
# Composing and Sending # Composing and Sending
set edit_headers=yes set edit_headers=yes
set include=yes set include=yes
# HTML email :( # HTML email :(
set mailcap_path="~/.mutt/mailcap" set mailcap_path="~/.config/mutt/mailcap"
auto_view text/html auto_view text/html
alternative_order text/html text/plain text/enriched alternative_order text/html text/plain text/enriched
@ -116,4 +116,4 @@ color quoted1 color37 default
color quoted2 color64 default color quoted2 color64 default
# Solarized (light theme) colors # Solarized (light theme) colors
#source ~/.mutt/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc #source ~/.config/mutt/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc

View file

@ -1,6 +1,6 @@
local treesitter_configs = require 'nvim-treesitter.configs' local treesitter = require 'nvim-treesitter'
treesitter_configs.setup { treesitter.setup {
ensure_installed = { "lua", "vim" }, ensure_installed = { "lua", "vim" },
sync_install = true, sync_install = true,
auto_install = true, auto_install = true,

View file

@ -3,8 +3,6 @@
local clangd_extensions = require 'clangd_extensions' local clangd_extensions = require 'clangd_extensions'
local cmp = require 'cmp' local cmp = require 'cmp'
local lspconfig = require 'lspconfig'
local keys = require 'keys' local keys = require 'keys'
cmp.setup { cmp.setup {
@ -60,7 +58,7 @@ local function on_attach(client, buffer_number)
keys.init_lsp_key_mappings(buffer_number) keys.init_lsp_key_mappings(buffer_number)
end end
lspconfig.clangd.setup { vim.lsp.config("clangd", {
on_attach = function(client, buffer_number) on_attach = function(client, buffer_number)
on_attach(client, buffer_number) on_attach(client, buffer_number)
@ -69,24 +67,24 @@ lspconfig.clangd.setup {
clangd_inlay_hints.set_inlay_hints() clangd_inlay_hints.set_inlay_hints()
end, end,
capabilities = cmp_capabilities, capabilities = cmp_capabilities,
} })
lspconfig.eslint.setup { vim.lsp.config("eslint", {
on_attach = on_attach, on_attach = on_attach,
capabilities = cmp_capabilities, capabilities = cmp_capabilities,
} })
lspconfig.ts_ls.setup { vim.lsp.config("ts_ls", {
on_attach = on_attach, on_attach = on_attach,
capabilities = cmp_capabilities, capabilities = cmp_capabilities,
} })
lspconfig.html.setup { vim.lsp.config("html", {
on_attach = on_attach, on_attach = on_attach,
capabilities = cmp_capabilities, capabilities = cmp_capabilities,
} })
lspconfig.lua_ls.setup { vim.lsp.config("lua_ls", {
on_attach = on_attach, on_attach = on_attach,
capabilities = cmp_capabilities, capabilities = cmp_capabilities,
settings = { settings = {
@ -101,14 +99,14 @@ lspconfig.lua_ls.setup {
}, },
}, },
}, },
} })
lspconfig.pyright.setup { vim.lsp.config("pyright", {
on_attach = on_attach, on_attach = on_attach,
capabilities = cmp_capabilities, capabilities = cmp_capabilities,
} })
lspconfig.rust_analyzer.setup { vim.lsp.config("rust_analyzer", {
on_attach = function(client, buffer_number) on_attach = function(client, buffer_number)
on_attach(client, buffer_number) on_attach(client, buffer_number)
end, end,
@ -139,4 +137,4 @@ lspconfig.rust_analyzer.setup {
}, },
}, },
}, },
} })

View file

@ -1,7 +1,7 @@
-- Treesitter configuration -- Treesitter configuration
-- Eryn Wells <eryn@erynwells.me> -- Eryn Wells <eryn@erynwells.me>
local treesitter = require 'nvim-treesitter.configs' local treesitter = require 'nvim-treesitter'
-- For some reason the Lua linter complains about missing fields here even -- For some reason the Lua linter complains about missing fields here even
-- though they're not requried. So, ignore the error. -- though they're not requried. So, ignore the error.

View file

@ -1,16 +0,0 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
autoload load_module
local myfpath="$HOME/.zsh/func"
for func in $myfpath/*; do
[[ ! -e "$func" || -d "$func" ]] && continue
local functionName=`basename $func`
[[ "$functionName" =~ "prompt_*" ]] && continue
[[ "$functionName" =~ "init_*" ]] && continue
autoload -Uz $functionName
done

View file

@ -0,0 +1,46 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
# See https://specifications.freedesktop.org/basedir/latest/ for definitions of
# these paths.
function init-env-default-xdg-vars
{
zmodload zsh/zutil
local -a opt_create
zparseopts -a opt_args -D -E -F - \
{c,-create,-no-create}=opt_create
# Base directories
export \
XDG_BIN_HOME=${XDG_BIN_HOME:-$HOME/.local/bin} \
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} \
XDG_CONFIG_HOME=${XDG_CACHE_HOME:-$HOME/.config} \
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} \
XDG_STATE_HOME=${XDG_DATA_HOME:-$HOME/.local/state} \
XDG_RUNTIME_DIR=${XDG_DATA_HOME:-$HOME/.local/var}
# User directories
export \
XDG_DESKTOP_DIR=${XDG_DESKTOP_DIR:-$HOME/Desktop} \
XDG_DOCUMENTS_DIR=${XDG_DOCUMENTS_DIR:-$HOME/Document} \
XDG_DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads} \
XDG_MUSIC_DIR=${XDG_MUSIC_DIR:-$HOME/Music} \
XDG_PICTURES_DIR=${XDG_PICTURES_DIR:-$HOME/Pictures} \
XDG_PUBLICSHARE_DIR=${XDG_PUBLICSHARE_DIR:-$HOME/Public} \
XDG_VIDEOS_DIR=${XDG_VIDEOS_DIR:-$HOME/Video}
if [[ $opt_create[(I)--no-create] -ne 0 ]]; then
mkdir -p -m 0700 \
$XDG_BIN_HOME \
$XDG_CACHE_HOME \
$XDG_CONFIG_HOME \
$XDG_DATA_HOME \
$XDG_STATE_HOME
fi
}
init-env-default-xdg-vars "$@"

View file

@ -16,7 +16,7 @@ function init-env-tilde-paths
break break
done done
export df=~/.dotfiles export df="$DOTFILES_HOME"
} }
init-env-tilde-paths "$@" init-env-tilde-paths "$@"

View file

@ -5,11 +5,27 @@ unsetopt GLOBAL_RCS
export SYS=`uname -s | tr A-Z a-z` export SYS=`uname -s | tr A-Z a-z`
function init-env-dotfiles-path
{
local dotfiles_config="$HOME/.config/dotfiles/home"
if [[ -f "$dotfiles_config" ]]; then
export DOTFILES_HOME=$(cat "$dotfiles_config")
return
fi
if [[ -f "$HOME/.dotfiles/setup.sh" ]]; then
export DOTFILES_HOME="$HOME/.dotfiles"
return
fi
echo "WARNING: Couldn't find path to dotfiles" 1>&2
}
function init-env-fpath function init-env-fpath
{ {
local -r fpath_candidates=( \ local -r fpath_candidates=( \
"$HOME/.zsh/${SYS}-functions" \ "$DOTFILES_HOME/zsh/${SYS}-functions" \
"$HOME/.zsh/func" \ "$DOTFILES_HOME/zsh/functions" \
) )
# Process the array in reverse order (`Oa` means "descending index order", # Process the array in reverse order (`Oa` means "descending index order",
@ -23,12 +39,14 @@ function init-env-fpath
done done
} }
init-env-dotfiles-path
init-env-fpath init-env-fpath
autoload -Uz do_init_functions autoload -Uz do_init_functions
typeset -a zsh_init_env_functions=( \ typeset -a zsh_init_env_functions=( \
init-env \ init-env \
init-env-default-xdg-vars \
init-env-path \ init-env-path \
init-env-tilde-paths \ init-env-tilde-paths \
init-env-python \ init-env-python \

View file