diff options
| -rw-r--r-- | .bash_profile | 12 | ||||
| -rw-r--r-- | .bashrc | 2 | ||||
| -rw-r--r-- | .config/fish/config.fish | 19 | ||||
| -rw-r--r-- | .config/git/config (renamed from .gitconfig) | 0 | ||||
| -rwxr-xr-x | .config/nvim/coc-settings.json | 18 | ||||
| -rw-r--r-- | .config/nvim/init.vim | 38 | ||||
| -rw-r--r-- | .config/shell/profile | 17 | ||||
| -rw-r--r-- | .config/zsh/.zshenv | 11 |
8 files changed, 80 insertions, 37 deletions
diff --git a/.bash_profile b/.bash_profile index 070ea94..65cbbb1 100644 --- a/.bash_profile +++ b/.bash_profile @@ -9,11 +9,9 @@ then export PATH="$HOME/.local/bin:$PATH" fi -# default programs -export EDITOR='nvim' -export VISUAL='nvim' -export GPG_TTY=$TTY +source "$HOME/.config/shell/profile" -# paths -export CARGO_HOME="$HOME/.local/share/cargo" -export RUSTUP_HOME="$HOME/.local/share/rustup" +#if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} ]] +#then +# exec fish +#fi @@ -6,6 +6,8 @@ # always source profile source "$HOME/.bash_profile" +export HISTFILE="$XDG_STATE_HOME/bash/history" + # aliases alias ls='exa' alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 35da1bb..2af421a 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -3,20 +3,5 @@ # -# add ~/.local/bin to path if the directory exists -function add_local_bin - set -f dir "$HOME/.local/bin" - if test -e $dir; and not contains $dir $PATH - fish_add_path "$HOME/.local/bin" - end -end -add_local_bin - -# default programs -set -gx VISUAL nvim -set -gx EDITOR nvim -set -gx GPG_TTY (tty) - -# paths -set -gx CARGO_HOME "$HOME/.local/share/cargo" -set -gx RUSTUP_HOME "$HOME/.local/share/rustup" +# plugins +starship init fish | source diff --git a/.gitconfig b/.config/git/config index 1d7fad7..1d7fad7 100644 --- a/.gitconfig +++ b/.config/git/config diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json new file mode 100755 index 0000000..22e27a8 --- /dev/null +++ b/.config/nvim/coc-settings.json @@ -0,0 +1,18 @@ +{ + "languageserver": { + "bash": { + "command": "bash-language-server", + "args": [ + "start" + ], + "filetypes": [ + "sh", + "PKGBUILD" + ] + } + }, + "python.linting.flake8Enabled": true, + "coc.preferences.formatOnSaveFiletypes": [ + "json" + ] +} diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 3589bf3..cbedb8e 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -6,10 +6,32 @@ call plug#begin() Plug 'itchyny/lightline.vim' -Plug 'ayu-theme/ayu-vim' +Plug 'joshdick/onedark.vim' +Plug 'arcticicestudio/nord-vim' +Plug 'rose-pine/neovim', {'as': 'rose-pine'} +Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() +" coc settings +"" use <tab> for trigger completion and navigate to the next complete item +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction + +"" for lightline.vim +function! CocCurrentFunction() + return get(b:, 'coc_current_function', '') +endfunction + +inoremap <silent><expr> <Tab> + \ pumvisible() ? "\<C-n>" : + \ <SID>check_back_space() ? "\<Tab>" : + \ coc#refresh() + +inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" + " options set tabstop=2 set shiftwidth=2 @@ -20,7 +42,15 @@ set smartindent syntax on filetype plugin indent on set termguicolors -let ayucolor="mirage" -colorscheme ayu +colorscheme onedark let g:lightline = { - \ 'colorscheme': 'ayu_mirage'} + \ 'colorscheme': 'onedark', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'cocstatus', 'currentfunction', 'readonly', 'filename', 'modified' ] ] + \ }, + \ 'component_function': { + \ 'cocstatus': 'coc#status', + \ 'currentfunction': 'CocCurrentFunction' + \ }, + \ } diff --git a/.config/shell/profile b/.config/shell/profile new file mode 100644 index 0000000..804ff2a --- /dev/null +++ b/.config/shell/profile @@ -0,0 +1,17 @@ +# default programs +export EDITOR='nvim' +export VISUAL='nvim' +export GPG_TTY=$TTY + +# xdg dirs +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_STATE_HOME="$HOME/.local/state" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_DIRS="/usr/local/share/:/usr/share/" +export XDG_CONFIG_DIRS="/etc/xdg" + +# paths +export CARGO_HOME="$XDG_DATA_HOME/cargo" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" +export LESSHISTFILE="$XDG_STATE_HOME/less/history" diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index ce840bc..c32ce0b 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -11,12 +11,5 @@ if [[ -d "$HOME/.local/bin" ]]; then export PATH fi -# default programs -export EDITOR='nvim' -export VISUAL='nvim' -export GPG_TTY=$TTY - -# paths -export ZDOTDIR="$HOME/.config/zsh" -export CARGO_HOME="$HOME/.local/share/cargo" -export RUSTUP_HOME="$HOME/.local/share/rustup" +source "$HOME/.config/shell/profile" +ZDOTDIR="$XDG_CONFIG_HOME/zsh" |
