feat(editorconfig): add editorconfig and using php-cli from container
This commit is contained in:
36
editorconfig/dot-editorconfig
Normal file
36
editorconfig/dot-editorconfig
Normal file
@@ -0,0 +1,36 @@
|
||||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
# Spaces in coffee
|
||||
[**.coffee]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[**.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Tabs in less
|
||||
[**.less]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
|
||||
[**.css]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
|
||||
[**.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[**.html]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
@@ -15,6 +15,7 @@
|
||||
excludesfile = /Users/rack/.gitignore_global
|
||||
fileMode = false
|
||||
ignorecase = false
|
||||
editor = nvim
|
||||
[difftool "sourcetree"]
|
||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||
path =
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# Add HomeBrew PATH
|
||||
export PATH=/opt/homebrew/bin:$PATH
|
||||
|
||||
# EXA
|
||||
[ -x /opt/homebrew/bin/exa ] && alias ll="exa -l -g --icons"
|
||||
|
||||
# PHP
|
||||
export PATH="/opt/homebrew/opt/php/bin:$PATH"
|
||||
export PATH="/opt/homebrew/opt/php/sbin:$PATH"
|
||||
|
||||
# PHP in container
|
||||
[ -x /usr/local/bin/docker ] && alias composer="docker run --rm --interactive --tty --volume \$PWD:/app --volume \$HOME/.composer:/tmp composer:latest composer"
|
||||
[ -x /usr/local/bin/docker ] && alias php="docker run --rm --interactive --tty --volume \$PWD:/app --volume /Users:/Users composer:latest php"
|
||||
[ -x /usr/local/bin/docker ] && alias php8="docker run --rm --interactive --tty --volume \$PWD:/app composer:latest php"
|
||||
[ -x /usr/local/bin/docker ] && alias php7="docker run --rm --interactive --tty --volume \$PWD:/app --workdir /app php:7.4-cli php"
|
||||
[ -x /usr/local/bin/docker ] && alias laravel="docker run --rm --interactive --tty --volume \$PWD:/app --volume \$HOME/.composer:/tmp composer:latest /tmp/vendor/bin/laravel"
|
||||
|
||||
@@ -10,7 +10,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
||||
fi
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
export PATH=$HOME/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
@@ -82,7 +82,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git)
|
||||
plugins=(git docker ripgrep tig)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
@@ -91,14 +91,14 @@ source $ZSH/oh-my-zsh.sh
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
else
|
||||
export EDITOR='nvim'
|
||||
fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
Reference in New Issue
Block a user