Актуальные dotfile
This commit is contained in:
parent
a31ceb244f
commit
28a673a467
14 changed files with 4102 additions and 311 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
nvim/plugged/
|
||||
|
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -1,6 +1,3 @@
|
|||
[submodule "oh-my-zsh"]
|
||||
path = zsh/omz
|
||||
url = https://github.com/ohmyzsh/ohmyzsh
|
||||
[submodule "zsh/omz"]
|
||||
path = zsh/omz
|
||||
url = https://github.com/ohmyzsh/ohmyzsh.git
|
||||
[submodule "zsh/p10k"]
|
||||
path = zsh/p10k
|
||||
url = https://gitrepo.ru/NeonXP/powerlevel10k.git
|
||||
|
|
50
Makefile
Normal file
50
Makefile
Normal file
|
@ -0,0 +1,50 @@
|
|||
pwd = $(shell pwd)
|
||||
osver=$(shell lsb_release -sr)
|
||||
oscodename=$(shell lsb_release -sc)
|
||||
arch=$(shell dpkg --print-architecture)
|
||||
|
||||
.PHONY: all
|
||||
all: /usr/bin/docker /usr/bin/go /usr/bin/nvim dotfiles golibs
|
||||
|
||||
# Docker install
|
||||
.PHONY: /usr/bin/docker
|
||||
/usr/bin/docker:
|
||||
|
||||
sudo apt-get install ca-certificates curl
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
|
||||
echo "deb [arch=$(arch) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(oscodename) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt update
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
# Go install
|
||||
.PHONY: /usr/bin/go
|
||||
/usr/bin/go:
|
||||
sudo add-apt-repository ppa:longsleep/golang-backports
|
||||
sudo apt install golang-go
|
||||
|
||||
.PHONY: golibs
|
||||
golibs: /usr/bin/go
|
||||
go install github.com/goreleaser/goreleaser@latest
|
||||
go install github.com/mkchoi212/fac@latest
|
||||
|
||||
# Neovim
|
||||
.PHONY: /usr/bin/nvim
|
||||
/usr/bin/nvim:
|
||||
sudo add-apt-repository -r ppa:neovim-ppa/stable
|
||||
sudo apt install neovim
|
||||
|
||||
# dotfiles
|
||||
.PHONY: dotfiles
|
||||
dotfiles: ~/.gitconfig ~/.gitignore ~/.config/zsh ~/.zshrc
|
||||
|
||||
~/.gitconfig:
|
||||
@ln -s $(pwd)/git/config ~/.gitconfig || true
|
||||
~/.gitignore:
|
||||
@ln -s $(pwd)/git/ignore ~/.gitignore || true
|
||||
~/.config/zsh:
|
||||
@ln -s $(pwd)/zsh ~/.config/zsh || true
|
||||
~/.zshrc:
|
||||
@ln -s $(pwd)/zsh/zshrc ~/.zshrc || true
|
|
@ -10,7 +10,6 @@ Inventory created at: пятница, 7 января 2022 г. 03:53:45 (MSK)
|
|||
- [x] cmake: Cross-platform make
|
||||
- [x] exa: Modern replacement for 'ls'
|
||||
- [x] fac: Command line User Interface for fixing git conflicts
|
||||
- [x] fish: User-friendly command-line shell for UNIX-like operating systems
|
||||
- [x] fzf: Command-line fuzzy finder written in Go
|
||||
- [x] git: Distributed revision control system
|
||||
- [x] git-delta: Syntax-highlighting pager for git and diff output
|
||||
|
@ -22,11 +21,9 @@ Inventory created at: пятница, 7 января 2022 г. 03:53:45 (MSK)
|
|||
- [x] lima: Linux virtual machines
|
||||
- [x] micro: Modern and intuitive terminal-based text editor
|
||||
- [x] mosh: Remote terminal application
|
||||
- [x] mutt: Mongrel of mail user agents (part elm, pine, mush, mh, etc.)
|
||||
- [x] neovim: Ambitious Vim-fork focused on extensibility and agility
|
||||
- [x] node: Platform built on V8 to build network applications
|
||||
- [x] openttd: Simulation game based upon Transport Tycoon Deluxe
|
||||
- [x] phpunit: Programmer-oriented testing framework for PHP
|
||||
- [x] podman: Tool for managing OCI containers and pods
|
||||
- [x] pomodoro: Pomodoro timer for nerds
|
||||
- [x] rabbitmq-c: C AMQP client library for RabbitMQ
|
||||
|
@ -40,16 +37,9 @@ Inventory created at: пятница, 7 января 2022 г. 03:53:45 (MSK)
|
|||
|
||||
## Casks
|
||||
|
||||
- [x] bitwarden: (failed to read homepage information)
|
||||
- [x] firefox-developer-edition: (failed to read homepage information)
|
||||
- [x] font-fira-mono: (failed to read homepage information)
|
||||
- [x] font-fira-mono-nerd-font: (failed to read homepage information)
|
||||
- [x] goland: (failed to read homepage information)
|
||||
- [x] iterm2-beta: (failed to read homepage information)
|
||||
- [x] josm: (failed to read homepage information)
|
||||
- [x] notion: (failed to read homepage information)
|
||||
- [x] raycast: (failed to read homepage information)
|
||||
- [x] robo-3t: (failed to read homepage information)
|
||||
- [x] telegram: (failed to read homepage information)
|
||||
- [x] vscodium: (failed to read homepage information)
|
||||
- [x] yandex: (failed to read homepage information)
|
||||
|
@ -57,9 +47,7 @@ Inventory created at: пятница, 7 января 2022 г. 03:53:45 (MSK)
|
|||
## Installed taps
|
||||
|
||||
- [x] adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver
|
||||
- [x] caskroom/fonts
|
||||
- [x] d12frosted/emacs-plus
|
||||
- [x] gcenx/wine
|
||||
- [x] homebrew/cask-fonts
|
||||
- [x] go-swagger/go-swagger
|
||||
- [x] golangci/tap
|
||||
- [x] goreleaser/tap
|
||||
|
@ -74,7 +62,6 @@ Inventory created at: пятница, 7 января 2022 г. 03:53:45 (MSK)
|
|||
- [x] mongodb/brew
|
||||
- [x] neonxp/tap
|
||||
- [x] osx-cross/avr
|
||||
- [x] railwaycat/emacsmacport
|
||||
- [x] skyjake/lagrange
|
||||
- [x] tinygo-org/tools
|
||||
- [x] wtfutil/wtfutil
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[user]
|
||||
name = Alexander Kiryukhin
|
||||
email = a.kiryukhin@mail.ru
|
||||
signingkey = 1F234ED9217CA16DE1ACBA686DF7A2910D0699E9
|
||||
email = i@neonxp.ru
|
||||
signingkey = 35E33E1AB7776B39
|
||||
|
||||
[alias]
|
||||
co = checkout
|
||||
|
@ -105,8 +105,8 @@
|
|||
submodulesummary = true
|
||||
|
||||
[sendemail]
|
||||
smtpserver = smtp.mail.ru
|
||||
smtpuser = a.kiryukhin@mail.ru
|
||||
# smtpserver = smtp.mail.ru
|
||||
# smtpuser = a.kiryukhin@mail.ru
|
||||
smtpserverport = 25
|
||||
smtpencryption = tls
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
ln -s $(pwd)/nvim ${HOME}/.config/nvim
|
||||
ln -s $(pwd)/git/config ${HOME}/.gitconfig
|
||||
ln -s $(pwd)/git/ignore ${HOME}/.gitignore
|
||||
ln -s $(pwd)/zsh/omz ${HOME}/.oh-my-zsh
|
||||
ln -s $(pwd)/zsh/zshrc ${HOME}/.zshrc
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"languageserver": {
|
||||
"golang": {
|
||||
"command": "gopls",
|
||||
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
|
||||
"filetypes": ["go"]
|
||||
}
|
||||
}
|
||||
}
|
205
nvim/init.vim
205
nvim/init.vim
|
@ -1,205 +0,0 @@
|
|||
syntax on
|
||||
set ruler " Show the line and column numbers of the cursor.
|
||||
set formatoptions+=o " Continue comment marker in new lines.
|
||||
set textwidth=0 " Hard-wrap long lines as you type them.
|
||||
set modeline " Enable modeline.
|
||||
"set esckeys " Cursor keys in insert mode.
|
||||
set linespace=0 " Set line-spacing to minimum.
|
||||
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
|
||||
" More natural splits
|
||||
set splitbelow " Horizontal split below current.
|
||||
set splitright " Vertical split to right of current.
|
||||
if !&scrolloff
|
||||
set scrolloff=3 " Show next 3 lines while scrolling.
|
||||
endif
|
||||
if !&sidescrolloff
|
||||
set sidescrolloff=5 " Show next 5 columns while side-scrolling.
|
||||
endif
|
||||
set display+=lastline
|
||||
set nostartofline " Do not jump to first character with page commands.
|
||||
set noerrorbells " No beeps
|
||||
set backspace=indent,eol,start " Makes backspace key more powerful.
|
||||
set showcmd " Show me what I'm typing
|
||||
set showmode " Show current mode.
|
||||
set noswapfile " Don't use swapfile
|
||||
set nobackup " Don't create annoying backup files
|
||||
set encoding=utf-8 " Set default encoding to UTF-8
|
||||
set autowrite " Automatically save before :next, :make etc.
|
||||
set autoread " Automatically reread changed files without asking me anything
|
||||
set laststatus=2
|
||||
set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
|
||||
set showmatch " Do not show matching brackets by flickering
|
||||
set incsearch " Shows the match while typing
|
||||
set hlsearch " Highlight found searches
|
||||
set ignorecase " Search case insensitive...
|
||||
set smartcase " ... but not when search pattern contains upper case characters
|
||||
set gdefault " Use 'g' flag by default with :s/foo/bar/.
|
||||
set magic " Use 'magic' patterns (extended regular expressions).
|
||||
|
||||
" Use <C-L> to clear the highlighting of :set hlsearch.
|
||||
if maparg('<C-L>', 'n') ==# ''
|
||||
nnoremap <silent> <C-L> :nohlsearch<CR><C-L>
|
||||
endif
|
||||
|
||||
" Search and Replace
|
||||
nmap <Leader>s :%s//g<Left><Left>
|
||||
|
||||
" Leader key is like a command prefix.
|
||||
"let mapleader='z'
|
||||
"let maplocalleader='\'
|
||||
|
||||
let g:python_host_prog="/usr/local/bin/python2.7"
|
||||
|
||||
let g:session_autosave = 'yes'
|
||||
let g:session_autoload = 'yes'
|
||||
let g:session_default_to_last = 1
|
||||
|
||||
" set cursorcolumn
|
||||
nmap <Space> <PageDown>
|
||||
vmap <BS> x
|
||||
|
||||
" Plugins here
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||
" Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'Valloric/YouCompleteMe'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'Chiel92/vim-autoformat'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'crusoexia/vim-monokai'
|
||||
Plug 'projekt0n/github-nvim-theme'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'nvim-treesitter/nvim-treesitter'
|
||||
|
||||
Plug 'mfussenegger/nvim-dap'
|
||||
Plug 'rcarriga/nvim-dap-ui'
|
||||
Plug 'theHamsta/nvim-dap-virtual-text'
|
||||
Plug 'ray-x/guihua.lua' " float term, codeaction and codelens gui support
|
||||
|
||||
Plug 'ray-x/go.nvim'
|
||||
call plug#end()
|
||||
lua <<EOF
|
||||
require 'go'.setup({
|
||||
goimport = 'gopls', -- if set to 'gopls' will use golsp format
|
||||
gofmt = 'gopls', -- if set to gopls will use golsp format
|
||||
max_line_len = 120,
|
||||
tag_transform = false,
|
||||
test_dir = '',
|
||||
comment_placeholder = ' ',
|
||||
lsp_cfg = true, -- false: use your own lspconfig
|
||||
lsp_gofumpt = true, -- true: set default gofmt in gopls format to gofumpt
|
||||
lsp_on_attach = true, -- use on_attach from go.nvim
|
||||
dap_debug = true,
|
||||
})
|
||||
|
||||
local protocol = require'vim.lsp.protocol'
|
||||
|
||||
EOF
|
||||
set nu rnu
|
||||
set tabstop=4
|
||||
set shiftwidth=0
|
||||
set softtabstop=-1
|
||||
set expandtab
|
||||
set autoindent
|
||||
set cursorline
|
||||
set hidden
|
||||
" Better display for messages
|
||||
set cmdheight=2
|
||||
" Smaller updatetime for CursorHold & CursorHoldI
|
||||
set updatetime=300
|
||||
" don't give |ins-completion-menu| messages.
|
||||
set shortmess+=c
|
||||
" always show signcolumns
|
||||
set signcolumn=yes
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" deoplete config
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#disable_auto_complete = 1
|
||||
if has("gui_running")
|
||||
inoremap <silent><expr><C-Space> deoplete#mappings#manual_complete()
|
||||
else
|
||||
inoremap <silent><expr><C-@> deoplete#mappings#manual_complete()
|
||||
endif
|
||||
|
||||
" UltiSnips config
|
||||
inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
let g:UltiSnipsExpandTrigger="<tab>"
|
||||
let g:UltiSnipsJumpForwardTrigger="<tab>"
|
||||
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
||||
|
||||
" Tell Vim which characters to show for expanded TABs,
|
||||
" trailing whitespace, and end-of-lines. VERY useful!
|
||||
if &listchars ==# 'eol:$'
|
||||
" set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
set listchars=tab:>\ ,extends:>,precedes:<,nbsp:+
|
||||
endif
|
||||
|
||||
" nerdtree config
|
||||
map <c-n> :NERDTreeToggle<CR>
|
||||
|
||||
" airline settings
|
||||
let g:airline#extensions#tabline#enabled = 2
|
||||
let g:airline#extensions#tabline#fnamemod = ':t'
|
||||
let g:airline#extensions#tabline#left_sep = ' '
|
||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||
let g:airline#extensions#tabline#right_sep = ' '
|
||||
let g:airline#extensions#tabline#right_alt_sep = '|'
|
||||
let g:airline_powerline_fonts=1
|
||||
let g:airline_left_sep = ' '
|
||||
let g:airline_left_alt_sep = '|'
|
||||
let g:airline_right_sep = ' '
|
||||
let g:airline_right_alt_sep = '|'
|
||||
let g:airline_powerline_fonts=0
|
||||
let g:airline_theme='base16_default_dark'
|
||||
|
||||
" Multicursor
|
||||
let g:multi_cursor_use_default_mapping=0
|
||||
let g:multi_cursor_next_key='<C-e>'
|
||||
let g:multi_cursor_quit_key='<Esc>'
|
||||
let g:multi_cursor_quit_key='<Esc>'
|
||||
|
||||
" YouCompleteMe
|
||||
let g:ycm_autoclose_preview_window_after_completion = 1
|
||||
let g:ycm_min_num_of_chars_for_completion = 1
|
||||
|
||||
" Other
|
||||
set mouse=
|
||||
set list
|
||||
lua require('github-theme').setup()
|
||||
"darcula fix to hide the indents:
|
||||
set nolist
|
||||
|
||||
let NERDTreeIgnore = ['_site']
|
||||
|
||||
" Buffer handling
|
||||
nmap L :let &number=1-&number<CR>
|
||||
nmap <silent> <c-]> :bnext<CR>
|
||||
nmap <silent> <c-[> :bprevious<CR>
|
||||
nmap <leader>bq :bp <BAR> bd #<CR>
|
||||
nmap <leader>bl :ls<CR>
|
||||
nmap <leader>0 :set invnumber<CR>
|
||||
" map :q to byffer delete
|
||||
" http://stackoverflow.com/questions/7513380/vim-change-x-function-to-delete-buffer-instead-of-save-quit
|
||||
cnoreabbrev <expr> x getcmdtype() == ":" && getcmdline() == 'x' ? 'bd' : 'x'
|
||||
|
||||
nmap <silent> <c-k> :wincmd k<CR>
|
||||
nmap <silent> <c-j> :wincmd j<CR>
|
||||
nmap <silent> <c-h> :wincmd h<CR>
|
||||
nmap <silent> <c-l> :wincmd l<CR>
|
2057
zsh/antigen.zsh
Normal file
2057
zsh/antigen.zsh
Normal file
File diff suppressed because it is too large
Load diff
177
zsh/completion.zsh
Normal file
177
zsh/completion.zsh
Normal file
|
@ -0,0 +1,177 @@
|
|||
#compdef _kind kind
|
||||
|
||||
# zsh completion for kind -*- shell-script -*-
|
||||
|
||||
__kind_debug()
|
||||
{
|
||||
local file="$BASH_COMP_DEBUG_FILE"
|
||||
if [[ -n ${file} ]]; then
|
||||
echo "$*" >> "${file}"
|
||||
fi
|
||||
}
|
||||
|
||||
_kind()
|
||||
{
|
||||
local shellCompDirectiveError=1
|
||||
local shellCompDirectiveNoSpace=2
|
||||
local shellCompDirectiveNoFileComp=4
|
||||
local shellCompDirectiveFilterFileExt=8
|
||||
local shellCompDirectiveFilterDirs=16
|
||||
|
||||
local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
|
||||
local -a completions
|
||||
|
||||
__kind_debug "\n========= starting completion logic =========="
|
||||
__kind_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}"
|
||||
|
||||
# The user could have moved the cursor backwards on the command-line.
|
||||
# We need to trigger completion from the $CURRENT location, so we need
|
||||
# to truncate the command-line ($words) up to the $CURRENT location.
|
||||
# (We cannot use $CURSOR as its value does not work when a command is an alias.)
|
||||
words=("${=words[1,CURRENT]}")
|
||||
__kind_debug "Truncated words[*]: ${words[*]},"
|
||||
|
||||
lastParam=${words[-1]}
|
||||
lastChar=${lastParam[-1]}
|
||||
__kind_debug "lastParam: ${lastParam}, lastChar: ${lastChar}"
|
||||
|
||||
# For zsh, when completing a flag with an = (e.g., kind -n=<TAB>)
|
||||
# completions must be prefixed with the flag
|
||||
setopt local_options BASH_REMATCH
|
||||
if [[ "${lastParam}" =~ '-.*=' ]]; then
|
||||
# We are dealing with a flag with an =
|
||||
flagPrefix="-P ${BASH_REMATCH}"
|
||||
fi
|
||||
|
||||
# Prepare the command to obtain completions
|
||||
requestComp="${words[1]} __complete ${words[2,-1]}"
|
||||
if [ "${lastChar}" = "" ]; then
|
||||
# If the last parameter is complete (there is a space following it)
|
||||
# We add an extra empty parameter so we can indicate this to the go completion code.
|
||||
__kind_debug "Adding extra empty parameter"
|
||||
requestComp="${requestComp} \"\""
|
||||
fi
|
||||
|
||||
__kind_debug "About to call: eval ${requestComp}"
|
||||
|
||||
# Use eval to handle any environment variables and such
|
||||
out=$(eval ${requestComp} 2>/dev/null)
|
||||
__kind_debug "completion output: ${out}"
|
||||
|
||||
# Extract the directive integer following a : from the last line
|
||||
local lastLine
|
||||
while IFS='\n' read -r line; do
|
||||
lastLine=${line}
|
||||
done < <(printf "%s\n" "${out[@]}")
|
||||
__kind_debug "last line: ${lastLine}"
|
||||
|
||||
if [ "${lastLine[1]}" = : ]; then
|
||||
directive=${lastLine[2,-1]}
|
||||
# Remove the directive including the : and the newline
|
||||
local suffix
|
||||
(( suffix=${#lastLine}+2))
|
||||
out=${out[1,-$suffix]}
|
||||
else
|
||||
# There is no directive specified. Leave $out as is.
|
||||
__kind_debug "No directive found. Setting do default"
|
||||
directive=0
|
||||
fi
|
||||
|
||||
__kind_debug "directive: ${directive}"
|
||||
__kind_debug "completions: ${out}"
|
||||
__kind_debug "flagPrefix: ${flagPrefix}"
|
||||
|
||||
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
|
||||
__kind_debug "Completion received error. Ignoring completions."
|
||||
return
|
||||
fi
|
||||
|
||||
while IFS='\n' read -r comp; do
|
||||
if [ -n "$comp" ]; then
|
||||
# If requested, completions are returned with a description.
|
||||
# The description is preceded by a TAB character.
|
||||
# For zsh's _describe, we need to use a : instead of a TAB.
|
||||
# We first need to escape any : as part of the completion itself.
|
||||
comp=${comp//:/\\:}
|
||||
|
||||
local tab=$(printf '\t')
|
||||
comp=${comp//$tab/:}
|
||||
|
||||
__kind_debug "Adding completion: ${comp}"
|
||||
completions+=${comp}
|
||||
lastComp=$comp
|
||||
fi
|
||||
done < <(printf "%s\n" "${out[@]}")
|
||||
|
||||
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
|
||||
__kind_debug "Activating nospace."
|
||||
noSpace="-S ''"
|
||||
fi
|
||||
|
||||
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
|
||||
# File extension filtering
|
||||
local filteringCmd
|
||||
filteringCmd='_files'
|
||||
for filter in ${completions[@]}; do
|
||||
if [ ${filter[1]} != '*' ]; then
|
||||
# zsh requires a glob pattern to do file filtering
|
||||
filter="\*.$filter"
|
||||
fi
|
||||
filteringCmd+=" -g $filter"
|
||||
done
|
||||
filteringCmd+=" ${flagPrefix}"
|
||||
|
||||
__kind_debug "File filtering command: $filteringCmd"
|
||||
_arguments '*:filename:'"$filteringCmd"
|
||||
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
|
||||
# File completion for directories only
|
||||
local subdir
|
||||
subdir="${completions[1]}"
|
||||
if [ -n "$subdir" ]; then
|
||||
__kind_debug "Listing directories in $subdir"
|
||||
pushd "${subdir}" >/dev/null 2>&1
|
||||
else
|
||||
__kind_debug "Listing directories in ."
|
||||
fi
|
||||
|
||||
local result
|
||||
_arguments '*:dirname:_files -/'" ${flagPrefix}"
|
||||
result=$?
|
||||
if [ -n "$subdir" ]; then
|
||||
popd >/dev/null 2>&1
|
||||
fi
|
||||
return $result
|
||||
else
|
||||
__kind_debug "Calling _describe"
|
||||
if eval _describe "completions" completions $flagPrefix $noSpace; then
|
||||
__kind_debug "_describe found some completions"
|
||||
|
||||
# Return the success of having called _describe
|
||||
return 0
|
||||
else
|
||||
__kind_debug "_describe did not find completions."
|
||||
__kind_debug "Checking if we should do file completion."
|
||||
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
|
||||
__kind_debug "deactivating file completion"
|
||||
|
||||
# We must return an error code here to let zsh know that there were no
|
||||
# completions found by _describe; this is what will trigger other
|
||||
# matching algorithms to attempt to find completions.
|
||||
# For example zsh can match letters in the middle of words.
|
||||
return 1
|
||||
else
|
||||
# Perform file completion
|
||||
__kind_debug "Activating file completion"
|
||||
|
||||
# We must return the result of this command, so it must be the
|
||||
# last command, or else we must store its result to return it.
|
||||
_arguments '*:filename:_files'" ${flagPrefix}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# don't run the completion function when being source-ed or eval-ed
|
||||
if [ "$funcstack[1]" = "_kind" ]; then
|
||||
_kind
|
||||
fi
|
1
zsh/omz
1
zsh/omz
|
@ -1 +0,0 @@
|
|||
Subproject commit e9e8c6b54d594109041bdd4bc3902b40f9ae8849
|
1
zsh/p10k
Submodule
1
zsh/p10k
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 62341054d8aa40ade03fc55bdbc95b9ff2d8d2b6
|
1705
zsh/p10k.zsh
Normal file
1705
zsh/p10k.zsh
Normal file
File diff suppressed because it is too large
Load diff
146
zsh/zshrc
146
zsh/zshrc
|
@ -1,66 +1,108 @@
|
|||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# Exports
|
||||
export PATH=$HOME/.bin:/usr/local/bin:$HOME/go/bin:$PATH
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
export EDITOR="/usr/local/bin/micro"
|
||||
export EDITOR="nvim"
|
||||
|
||||
ZSH_THEME="robbyrussell"
|
||||
# Aliases
|
||||
[[ ! -f `which exa` ]] || alias ls="exa"
|
||||
alias ll="ls -la"
|
||||
alias cp="cp -i" # Confirm before overwriting something
|
||||
alias df='df -h' # Human-readable sizes
|
||||
alias free='free -m' # Show sizes in MB
|
||||
alias gitu='git add . && git commit && git push'
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
## Options section
|
||||
setopt correct # Auto correct mistakes
|
||||
setopt extendedglob # Extended globbing. Allows using regular expressions with *
|
||||
setopt nocaseglob # Case insensitive globbing
|
||||
setopt rcexpandparam # Array expension with parameters
|
||||
setopt nocheckjobs # Don't warn about running processes when exiting
|
||||
setopt numericglobsort # Sort filenames numerically when it makes sense
|
||||
setopt nobeep # No beep
|
||||
setopt appendhistory # Immediately append history instead of overwriting
|
||||
setopt histignorealldups # If a new command is a duplicate, remove the older one
|
||||
setopt autocd # if only directory path is entered, cd there.
|
||||
setopt inc_append_history # save commands are added to the history immediately, otherwise only when shell exits.
|
||||
setopt histignorespace # Don't save commands that start with space
|
||||
|
||||
# Uncomment one of the following lines to change the auto-update behavior
|
||||
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
|
||||
zstyle ':completion:*' rehash true # automatically find new executables in path
|
||||
# Speed up completions
|
||||
zstyle ':completion:*' accept-exact '*(N)'
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path ~/.zsh/cache
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
#export EDITOR=/usr/bin/nano
|
||||
#export VISUAL=/usr/bin/nano
|
||||
WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# zstyle ':omz:update' frequency 13
|
||||
autoload -U compinit colors zcalc
|
||||
compinit -d
|
||||
colors
|
||||
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
# Color man pages
|
||||
export LESS_TERMCAP_mb=$'\E[01;32m'
|
||||
export LESS_TERMCAP_md=$'\E[01;32m'
|
||||
export LESS_TERMCAP_me=$'\E[0m'
|
||||
export LESS_TERMCAP_se=$'\E[0m'
|
||||
export LESS_TERMCAP_so=$'\E[01;47;34m'
|
||||
export LESS_TERMCAP_ue=$'\E[0m'
|
||||
export LESS_TERMCAP_us=$'\E[01;36m'
|
||||
export LESS=-R
|
||||
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=yellow,underline"
|
||||
## Plugins section: Enable fish style features
|
||||
# Use syntax highlighting
|
||||
#source ${HOME}/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
# Use history substring search
|
||||
#source ${HOME}/.zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
# bind UP and DOWN arrow keys to history substring search
|
||||
zmodload zsh/terminfo
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
plugins=(git zsh-autosuggestions fzf golang)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
else
|
||||
export EDITOR='a'
|
||||
bindkey -e
|
||||
bindkey '^[[7~' beginning-of-line # Home key
|
||||
bindkey '^[[H' beginning-of-line # Home key
|
||||
if [[ "${terminfo[khome]}" != "" ]]; then
|
||||
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
|
||||
fi
|
||||
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
### Added by Zinit's installer
|
||||
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
|
||||
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
|
||||
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
|
||||
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
|
||||
print -P "%F{33} %F{34}Installation successful.%f%b" || \
|
||||
print -P "%F{160} The clone has failed.%f%b"
|
||||
bindkey '^[[8~' end-of-line # End key
|
||||
bindkey '^[[F' end-of-line # End key
|
||||
if [[ "${terminfo[kend]}" != "" ]]; then
|
||||
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
|
||||
fi
|
||||
bindkey '^[[2~' overwrite-mode # Insert key
|
||||
bindkey '^[[3~' delete-char # Delete key
|
||||
bindkey '^[[C' forward-char # Right key
|
||||
bindkey '^[[D' backward-char # Left key
|
||||
bindkey '^[[5~' history-beginning-search-backward # Page up key
|
||||
bindkey '^[[6~' history-beginning-search-forward # Page down key
|
||||
|
||||
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
|
||||
autoload -Uz _zinit
|
||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||
# Navigate words with ctrl+arrow keys
|
||||
bindkey '^[Oc' forward-word #
|
||||
bindkey '^[Od' backward-word #
|
||||
bindkey '^[[1;5D' backward-word #
|
||||
bindkey '^[[1;5C' forward-word #
|
||||
bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace
|
||||
bindkey '^[[Z' undo # Shift+tab undo last action
|
||||
|
||||
# Load a few important annexes, without Turbo
|
||||
# (this is currently required for annexes)
|
||||
zinit light-mode for \
|
||||
zdharma-continuum/zinit-annex-as-monitor \
|
||||
zdharma-continuum/zinit-annex-bin-gem-node \
|
||||
zdharma-continuum/zinit-annex-patch-dl \
|
||||
zdharma-continuum/zinit-annex-rust
|
||||
|
||||
### End of Zinit's installer chunk
|
||||
source ~/.config/zsh/p10k.zsh
|
||||
source ~/.config/zsh/p10k/powerlevel10k.zsh-theme
|
||||
source ~/.config/zsh/antigen.zsh
|
||||
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-history-substring-search
|
||||
antigen apply
|
||||
|
|
Loading…
Reference in a new issue