diff --git a/home/dot-zshenv b/home/dot-zshenv index 36ecd4a..05bb2d1 100644 --- a/home/dot-zshenv +++ b/home/dot-zshenv @@ -1,8 +1,27 @@ export ZDOTDIR="$HOME/.config/zsh" +export DOTS="$HOME/docs/repos/dots" + +export VISUAL="nvim" +export EDITOR="nvim" typeset -U path path+="$HOME/bin" -export DOTS="$HOME/docs/repos/dots" +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 # 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..5882b9f 100644 --- a/zsh/dot-zshrc +++ b/zsh/dot-zshrc @@ -21,7 +21,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 +29,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 +55,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 +77,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"