Compare commits
No commits in common. "950d1a928eb1d192f0e678a491bca9da0c899d09" and "f27cf30bd95d8b72265c61e6a1fa366812907d93" have entirely different histories.
950d1a928e
...
f27cf30bd9
5
p10k.zsh
5
p10k.zsh
@ -946,10 +946,11 @@
|
||||
# Python virtual environment color.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=true
|
||||
# Don't show Python version next to the virtual environment name.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
||||
# If set to "false", won't show virtualenv if pyenv is already shown.
|
||||
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=true
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
|
||||
# Separate environment name from Python version only with a space.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
||||
# Custom icon.
|
||||
|
@ -1,8 +1,7 @@
|
||||
bind-key C-b last-window
|
||||
set-option -g default-command /bin/zsh
|
||||
set-option -g default-shell /bin/zsh
|
||||
set-option -s default-terminal 'tmux-256color'
|
||||
set -ga terminal-overrides ',alacritty:RGB,*256col*:RGB'
|
||||
set-option -g default-terminal 'screen-256color'
|
||||
set-option -g history-limit 100000
|
||||
set-option -g prefix C-b
|
||||
set-option -g renumber-windows on
|
||||
|
@ -1,49 +1,33 @@
|
||||
{
|
||||
"languageserver": {
|
||||
"terraform": {
|
||||
"command": "terraform-lsp",
|
||||
"filetypes": [
|
||||
"terraform"
|
||||
]
|
||||
},
|
||||
"R": {
|
||||
"command": "R",
|
||||
"args": [
|
||||
"--slave",
|
||||
"-e",
|
||||
"languageserver::run()"
|
||||
],
|
||||
"filetypes": [
|
||||
"r"
|
||||
]
|
||||
},
|
||||
"bash": {
|
||||
"command": "bash-language-server",
|
||||
"args": [
|
||||
"start"
|
||||
],
|
||||
"filetypes": [
|
||||
"sh"
|
||||
],
|
||||
"ignoredRootPaths": [
|
||||
"~"
|
||||
]
|
||||
},
|
||||
"ruff-lsp": {
|
||||
"command": [
|
||||
"ruff-lsp"
|
||||
],
|
||||
"filetypes": [
|
||||
"python"
|
||||
]
|
||||
}
|
||||
},
|
||||
"pyright.enable": true,
|
||||
"pyright.inlayHints.functionReturnTypes": true,
|
||||
"pyright.inlayHints.variableTypes": true,
|
||||
"pyright.organizeimports.provider": "ruff",
|
||||
"pyright.testing.provider": "pytest",
|
||||
"python.formatting.provider": "ruff",
|
||||
"python.linting.ruffEnabled": true,
|
||||
"clangd.path": "~/.config/coc/extensions/coc-clangd-data/install/17.0.3/clangd_17.0.3/bin/clangd"
|
||||
"languageserver": {
|
||||
"terraform": {
|
||||
"command": "terraform-lsp",
|
||||
"filetypes": [
|
||||
"terraform"
|
||||
]
|
||||
},
|
||||
"R": {
|
||||
"command": "R",
|
||||
"args": [
|
||||
"--slave",
|
||||
"-e",
|
||||
"languageserver::run()"
|
||||
],
|
||||
"filetypes": [
|
||||
"r"
|
||||
]
|
||||
},
|
||||
"bash": {
|
||||
"command": "bash-language-server",
|
||||
"args": [
|
||||
"start"
|
||||
],
|
||||
"filetypes": [
|
||||
"sh"
|
||||
],
|
||||
"ignoredRootPaths": [
|
||||
"~"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
46
vimrc
46
vimrc
@ -15,7 +15,7 @@ set backupdir^=~/.vim/_backup//
|
||||
set cursorline
|
||||
set cursorcolumn
|
||||
set directory^=~/.vim/_temp//
|
||||
set encoding=utf-8
|
||||
set encoding=utf8
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set incsearch
|
||||
@ -24,12 +24,11 @@ set linebreak
|
||||
set modeline
|
||||
set nowrap
|
||||
set number
|
||||
set signcolumn=yes
|
||||
set smartcase
|
||||
set statusline+=%#warningmsg#
|
||||
set statusline+=%*
|
||||
set tabstop=4
|
||||
set updatetime=300
|
||||
set updatetime=100
|
||||
set textwidth=1000
|
||||
|
||||
if has("persistent_undo")
|
||||
@ -47,11 +46,9 @@ au BufRead,BufNewFile .envrc setfiletype sh
|
||||
au BufRead,BufNewFile Dockerfile* setfiletype dockerfile
|
||||
au BufRead,BufNewFile Pipfile setfiletype toml
|
||||
au BufRead,BufNewFile kubectl-edit-status-* setfiletype yaml
|
||||
au BufRead,BufNewFile *kubeconfig* setfiletype yaml
|
||||
au BufRead,BufNewFile .lintr setfiletype yaml
|
||||
au BufRead,BufNewFile devcontainer.json setfiletype jsonc
|
||||
au BufRead,BufNewFile devcontainer-feature.json setfiletype jsonc
|
||||
au BufRead,BufNewFile *.bicepparam setfiletype bicep
|
||||
au BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
|
||||
au FileType go nmap <leader>r <Plug>(go-run)
|
||||
au FileType go nmap <Leader>c <Plug>(go-coverage-toggle)
|
||||
@ -80,21 +77,20 @@ map <leader>l :Minimap<CR>
|
||||
map <leader>L :MinimapClose<CR>
|
||||
nmap <F8> :TagbarToggle<CR>
|
||||
|
||||
"augroup black_on_save
|
||||
" autocmd!
|
||||
" autocmd BufWritePre *.py Black
|
||||
"augroup end
|
||||
augroup black_on_save
|
||||
autocmd!
|
||||
autocmd BufWritePre *.py Black
|
||||
augroup end
|
||||
|
||||
autocmd BufNewFile,BufRead *.c set formatprg=astyle\ -t4\ -A14
|
||||
|
||||
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:black_use_virtualenv = 1
|
||||
let g:coc_global_extensions = ['coc-tsserver']
|
||||
let g:coc_node_path = "/home/dan/.nvm/versions/node/v16.9.1/bin/node"
|
||||
let g:go_auto_sameids = 1
|
||||
let g:go_auto_type_info = 1
|
||||
let g:go_def_mode = 'gopls'
|
||||
let g:go_def_mode='gopls'
|
||||
let g:go_fmt_command = "goimports"
|
||||
let g:go_highlight_build_constraints = 1
|
||||
let g:go_highlight_extra_types = 1
|
||||
@ -102,7 +98,7 @@ let g:go_highlight_fields = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_operators = 1
|
||||
let g:go_info_mode = 'gopls'
|
||||
let g:go_info_mode='gopls'
|
||||
let g:html_indent_script1 = "inc"
|
||||
let g:html_indent_style1 = "inc"
|
||||
let g:minimap_auto_start = 1
|
||||
@ -112,7 +108,6 @@ let g:minimap_highlight_search = 1
|
||||
let g:minimap_enable_highlight_colorgroup = 1
|
||||
let g:minimap_width = 10
|
||||
let g:python_highlight_all = 1
|
||||
let g:rehash256 = 1
|
||||
let g:rustfmt_autosave = 1
|
||||
let g:shfmt_extra_args = '-i 2'
|
||||
let g:shfmt_fmt_on_save = 1
|
||||
@ -122,16 +117,7 @@ let g:vim_markdown_folding_disabled = 1
|
||||
let g:vim_markdown_frontmatter = 1
|
||||
let g:yapf_style = "pep8"
|
||||
|
||||
|
||||
if exists('+termguicolors')
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
set termguicolors
|
||||
endif
|
||||
|
||||
"colorscheme dichromatic
|
||||
"colorscheme darcula
|
||||
colorscheme molokai
|
||||
colorscheme dracula
|
||||
|
||||
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
|
||||
hi minimapCursor ctermbg=59 ctermfg=228 guibg=#5F5F5F guifg=#FFFF87
|
||||
@ -145,4 +131,16 @@ function! <SID>SynStack()
|
||||
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
|
||||
endfunc
|
||||
|
||||
source ~/.vimrc.coc
|
||||
" use <tab> to trigger completion and navigate to the next complete item
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
inoremap <silent><expr> <Tab>
|
||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
||||
\ CheckBackspace() ? "\<Tab>" :
|
||||
\ coc#refresh()
|
||||
|
||||
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||
|
37
zshrc
37
zshrc
@ -42,12 +42,14 @@ fi
|
||||
|
||||
path=(
|
||||
$HOME/.rbenv/shims
|
||||
$HOME/.pyenv/shims
|
||||
$HOME/bin
|
||||
$HOME/go/bin
|
||||
$HOME/.local/bin
|
||||
$HOME/.cargo/bin
|
||||
$HOME/.rbenv/bin
|
||||
$HOME/.phpenv/bin
|
||||
$HOME/.pyenv/bin
|
||||
$HOME/.yarn/bin
|
||||
$HOME/.pulumi/bin
|
||||
${KREW_ROOT:-$HOME/.krew}/bin
|
||||
@ -95,6 +97,7 @@ plugins=(
|
||||
pip
|
||||
podman
|
||||
postgres
|
||||
pyenv
|
||||
python
|
||||
rails
|
||||
rake-fast
|
||||
@ -106,6 +109,7 @@ plugins=(
|
||||
symfony-complete
|
||||
tmux
|
||||
vagrant
|
||||
vault
|
||||
vi-mode
|
||||
yarn
|
||||
)
|
||||
@ -129,8 +133,6 @@ export EDITOR=vim
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
export SDKMAN_DIR="${HOME}/.sdkman"
|
||||
export VISUAL=vim
|
||||
export PTD_CACHE="${HOME}/.local/ptd"
|
||||
export PTD_ROOT="${HOME}/code/rstudio/ptd/infra"
|
||||
|
||||
# The completion for aws is not compatible with $fpath :scream_cat:
|
||||
if [[ -f /usr/local/share/zsh/site-functions/_aws ]] ; then
|
||||
@ -171,13 +173,7 @@ unsetopt correct_all
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
|
||||
if which pyenv >/dev/null; then
|
||||
if [[ "${HATCH_ENV_ACTIVE}" ]]; then
|
||||
: skipping pyenv when inside a hatch env
|
||||
else
|
||||
path=($HOME/.pyenv/shims $HOME/.pyenv/bin "${path[@]}")
|
||||
plugins=("${plugins[@]}" pyenv)
|
||||
eval "$(pyenv init - 2>/dev/null)"
|
||||
fi
|
||||
eval "$(pyenv init - 2>/dev/null)"
|
||||
fi
|
||||
|
||||
if which phpenv >/dev/null; then
|
||||
@ -230,23 +226,6 @@ function docker-cleanup() {
|
||||
done
|
||||
}
|
||||
|
||||
function ptd-completion() {
|
||||
if command -v ptd &>/dev/null; then
|
||||
eval "$(_PTD_COMPLETE=zsh_source ptd)"
|
||||
fi
|
||||
}
|
||||
|
||||
function mksecret() {
|
||||
local nbytes="${1:-42}"
|
||||
|
||||
python3 <<EOPYTHON | tr -d '/' | tr -d '+' | cut -b1-$((nbytes - 1))
|
||||
import secrets
|
||||
import base64
|
||||
|
||||
print(base64.b64encode(secrets.token_bytes(${nbytes} * 2)).decode(), end="")
|
||||
EOPYTHON
|
||||
}
|
||||
|
||||
export NVM_DIR="${HOME}/.nvm"
|
||||
|
||||
__maybesource ~/.zshenv
|
||||
@ -286,12 +265,6 @@ fi
|
||||
compdef _symfony_complete composer
|
||||
compdef _symfony_complete dep
|
||||
|
||||
alias fz=fuzzbucket-client
|
||||
|
||||
if ptd --version &>/dev/null; then
|
||||
ptd-completion
|
||||
fi
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user