diff --git a/home/dot-zshenv b/home/dot-zshenv index 36ecd4a..67b45c9 100644 --- a/home/dot-zshenv +++ b/home/dot-zshenv @@ -1,8 +1,3 @@ export ZDOTDIR="$HOME/.config/zsh" -typeset -U path -path+="$HOME/bin" - -export DOTS="$HOME/docs/repos/dots" - # vim: filetype=zsh diff --git a/nvim/lua/filetypes.lua b/nvim/lua/filetypes.lua index a80698e..7217f41 100644 --- a/nvim/lua/filetypes.lua +++ b/nvim/lua/filetypes.lua @@ -24,7 +24,7 @@ vim.api.nvim_create_autocmd("Filetype", { vim.api.nvim_create_autocmd("Filetype", { group = vim.api.nvim_create_augroup("webDev", {}), - pattern = { "html", "css", "javascript", "javascriptreact", "json" }, + pattern = { "html", "css", "javascript", "svelte", "javascriptreact", "json" }, callback = function() vim.cmd [[setlocal tabstop=2 softtabstop=2 shiftwidth=2]] vim.bo.formatprg = "prettier --stdin-filepath " .. vim.fn.expand("%:p") diff --git a/zsh/dot-zshrc b/zsh/dot-zshrc index c59b87a..b5ab2b8 100644 --- a/zsh/dot-zshrc +++ b/zsh/dot-zshrc @@ -10,6 +10,31 @@ function zsh_add_plugin() { safe_source "$HOME/.local/share/zsh/plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh" } +export DOTS="$HOME/docs/repos/dots" + +export VISUAL="nvim" +export EDITOR="nvim" + +typeset -U path +path+="$HOME/bin" + +if (( $+commands[npm] )); then + export npm_config_prefix="$HOME/.local/npm" + path+="$HOME/.local/npm/bin" +fi + +if (( $+commands[go] )); then + path+="$HOME/go/bin" +fi + +if (( $+commands[pyenv] )); then + source <(pyenv init -) +fi + +if (( $+commands[fzf] )); then + source <(fzf --zsh) +fi + if (( $+commands[starship] )); then source <(starship init zsh) else @@ -21,7 +46,6 @@ else fi zsh_add_plugin "mattmc3/ez-compinit" - zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS} zstyle ":completion:*" matcher-list "m:{a-z}={A-Za-z}" zstyle ":completion:*" menu no @@ -30,7 +54,6 @@ zstyle ":completion:*:git-checkout:*" sort false zstyle ":fzf-tab:complete:cd:*" fzf-preview 'eza -1 --group-directories-first --color=always --icons=always $realpath' create_dir "$HOME/.local/state/zsh" - HISTFILE="$HOME/.local/state/zsh/history" HISTSIZE=65536 SAVEHIST=$HISTSIZE @@ -57,35 +80,12 @@ zsh_add_plugin "jeffreytse/zsh-vi-mode" ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM -export VISUAL="nvim" -export EDITOR="nvim" - -if (( $+commands[npm] )); then - export npm_config_prefix="$HOME/.local/npm" - path+="$HOME/.local/npm/bin" -fi - -if (( $+commands[pyenv] )); then - source <(pyenv init -) -fi - -if (( $+commands[fzf] )); then - source <(fzf --zsh) -fi - autoload -z edit-command-line zle -N edit-command-line bindkey "^V" edit-command-line bindkey "^Y" autosuggest-execute bindkey "^F" fzf-cd-widget -############################################################################### -# FUNCTIONS # -############################################################################### - -function cc() python -c "from math import *; print($*)" -alias cc="noglob cc" - ############################################################################### # ALIASES # ############################################################################### @@ -102,6 +102,9 @@ if [[ -f /etc/os-release ]]; then fi fi +function cc() python -c "from math import *; print($*)" +alias cc="noglob cc" + alias vi="nvim" alias l="eza -x --group-directories-first --icons always"