Compare commits
17 commits
e8aca4c7da
...
929f951391
| Author | SHA1 | Date | |
|---|---|---|---|
| 929f951391 | |||
| b36b4ac390 | |||
| 3669a7efc0 | |||
| e188601053 | |||
| a11355afc4 | |||
| 70712ad483 | |||
| dfd810e0b0 | |||
| f462cf28a7 | |||
| 5b567ad2ad | |||
| e45c1694af | |||
| d5f7b3e04c | |||
| 1f088a1e8a | |||
| 7c08c5131f | |||
| 91da2fc583 | |||
| 4f06d80da6 | |||
| cbebbffee0 | |||
| 0d3b4a232f |
91 changed files with 101 additions and 56 deletions
|
|
@ -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) $^ $@
|
||||
all : $(DATFILES)
|
||||
|
||||
.PHONY: all
|
||||
all: $(DATFILES)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
clean : .PHONY
|
||||
rm -f $(DATFILES)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
mentioning where you got it.
|
||||
|
||||
My environment relies on `zsh`, `vim`, and `git`.
|
||||
My environment relies on `zsh`, `neovim`, and `git`.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
[core]
|
||||
editor = nvim
|
||||
quotepath = false
|
||||
excludesfile = ~/.gitignore
|
||||
[color]
|
||||
ui = auto
|
||||
[alias]
|
||||
|
|
@ -19,9 +19,9 @@ set timeout=300
|
|||
set imap_keepalive=300
|
||||
|
||||
# Caching
|
||||
set header_cache="~/.mutt/cache/headers"
|
||||
set message_cachedir="~/.mutt/cache/bodies"
|
||||
set certificate_file="~/.mutt/certificates"
|
||||
set header_cache="~/.cache/mutt/headers"
|
||||
set message_cachedir="~/.cache/mutt/bodies"
|
||||
set certificate_file="~/.cache/mutt/certificates"
|
||||
|
||||
set use_from=yes
|
||||
set envelope_from=yes
|
||||
|
|
@ -50,14 +50,14 @@ hdr_order Date: From: To: Cc: Subject:
|
|||
|
||||
# Aliases
|
||||
set reverse_alias=yes
|
||||
set alias_file="~/.mutt/aliases"
|
||||
set alias_file="~/.config/mutt/aliases"
|
||||
|
||||
# Composing and Sending
|
||||
set edit_headers=yes
|
||||
set include=yes
|
||||
|
||||
# HTML email :(
|
||||
set mailcap_path="~/.mutt/mailcap"
|
||||
set mailcap_path="~/.config/mutt/mailcap"
|
||||
auto_view text/html
|
||||
alternative_order text/html text/plain text/enriched
|
||||
|
||||
|
|
@ -116,4 +116,4 @@ color quoted1 color37 default
|
|||
color quoted2 color64 default
|
||||
|
||||
# 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
|
||||
|
|
@ -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" },
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
local clangd_extensions = require 'clangd_extensions'
|
||||
local cmp = require 'cmp'
|
||||
local lspconfig = require 'lspconfig'
|
||||
|
||||
local keys = require 'keys'
|
||||
|
||||
cmp.setup {
|
||||
|
|
@ -60,7 +58,7 @@ local function on_attach(client, buffer_number)
|
|||
keys.init_lsp_key_mappings(buffer_number)
|
||||
end
|
||||
|
||||
lspconfig.clangd.setup {
|
||||
vim.lsp.config("clangd", {
|
||||
on_attach = function(client, buffer_number)
|
||||
on_attach(client, buffer_number)
|
||||
|
||||
|
|
@ -69,24 +67,24 @@ lspconfig.clangd.setup {
|
|||
clangd_inlay_hints.set_inlay_hints()
|
||||
end,
|
||||
capabilities = cmp_capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
vim.lsp.config("eslint", {
|
||||
on_attach = on_attach,
|
||||
capabilities = cmp_capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.ts_ls.setup {
|
||||
vim.lsp.config("ts_ls", {
|
||||
on_attach = on_attach,
|
||||
capabilities = cmp_capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.html.setup {
|
||||
vim.lsp.config("html", {
|
||||
on_attach = on_attach,
|
||||
capabilities = cmp_capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
vim.lsp.config("lua_ls", {
|
||||
on_attach = on_attach,
|
||||
capabilities = cmp_capabilities,
|
||||
settings = {
|
||||
|
|
@ -101,14 +99,14 @@ lspconfig.lua_ls.setup {
|
|||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.pyright.setup {
|
||||
vim.lsp.config("pyright", {
|
||||
on_attach = on_attach,
|
||||
capabilities = cmp_capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
vim.lsp.config("rust_analyzer", {
|
||||
on_attach = function(client, buffer_number)
|
||||
on_attach(client, buffer_number)
|
||||
end,
|
||||
|
|
@ -139,4 +137,4 @@ lspconfig.rust_analyzer.setup {
|
|||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
-- Treesitter configuration
|
||||
-- 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
|
||||
-- though they're not requried. So, ignore the error.
|
||||
|
|
@ -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
|
||||
46
zsh/functions/init-env-default-xdg-vars
Normal file
46
zsh/functions/init-env-default-xdg-vars
Normal 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 "$@"
|
||||
|
|
@ -16,7 +16,7 @@ function init-env-tilde-paths
|
|||
break
|
||||
done
|
||||
|
||||
export df=~/.dotfiles
|
||||
export df="$DOTFILES_HOME"
|
||||
}
|
||||
|
||||
init-env-tilde-paths "$@"
|
||||
|
|
@ -5,11 +5,27 @@ unsetopt GLOBAL_RCS
|
|||
|
||||
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
|
||||
{
|
||||
local -r fpath_candidates=( \
|
||||
"$HOME/.zsh/${SYS}-functions" \
|
||||
"$HOME/.zsh/func" \
|
||||
"$DOTFILES_HOME/zsh/${SYS}-functions" \
|
||||
"$DOTFILES_HOME/zsh/functions" \
|
||||
)
|
||||
|
||||
# Process the array in reverse order (`Oa` means "descending index order",
|
||||
|
|
@ -23,12 +39,14 @@ function init-env-fpath
|
|||
done
|
||||
}
|
||||
|
||||
init-env-dotfiles-path
|
||||
init-env-fpath
|
||||
|
||||
autoload -Uz do_init_functions
|
||||
|
||||
typeset -a zsh_init_env_functions=( \
|
||||
init-env \
|
||||
init-env-default-xdg-vars \
|
||||
init-env-path \
|
||||
init-env-tilde-paths \
|
||||
init-env-python \
|
||||
Loading…
Add table
Add a link
Reference in a new issue