Switch to neovim, update skhd, iterm, yabai
This commit is contained in:
36
.config/nvim/coc.vim
Normal file
36
.config/nvim/coc.vim
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
" COC Edits
|
||||||
|
" Use tab for trigger completion with characters ahead and navigate.
|
||||||
|
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||||
|
" other plugin before putting this into your config.
|
||||||
|
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
|
||||||
|
|
||||||
|
" Use <c-space> to trigger completion.
|
||||||
|
if has('nvim')
|
||||||
|
inoremap <silent><expr> <c-space> coc#refresh()
|
||||||
|
else
|
||||||
|
inoremap <silent><expr> <c-@> coc#refresh()
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||||
|
" format on enter, <cr> could be remapped by other vim plugin
|
||||||
|
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||||
|
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||||
|
|
||||||
|
" Use `[g` and `]g` to navigate diagnostics
|
||||||
|
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||||
|
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||||
|
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||||
|
|
||||||
|
set runtimepath^=/home/xyvs/.vim/plugged/coc.nvim
|
||||||
|
filetype plugin indent on
|
||||||
|
syntax on
|
||||||
7
.config/nvim/init.vim
Normal file
7
.config/nvim/init.vim
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||||
|
let &packpath=&runtimepath
|
||||||
|
|
||||||
|
source ~/.vim/vimrc
|
||||||
|
source ~/.config/nvim/coc.vim
|
||||||
|
|
||||||
|
lua require('telescope').load_extension('coc')
|
||||||
@@ -9,7 +9,7 @@ alt - tab : yabai -m display --focus next || yabai -m display --focus first
|
|||||||
cmd - o : yabai -m space --create && \
|
cmd - o : yabai -m space --create && \
|
||||||
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
|
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
|
||||||
yabai -m space --focus "${index}"
|
yabai -m space --focus "${index}"
|
||||||
cmd - p : yabai -m space --destroy
|
# cmd - p : yabai -m space --destroy # Doesn't work
|
||||||
|
|
||||||
# switch spaces
|
# switch spaces
|
||||||
cmd - 1 : yabai -m space --focus 1
|
cmd - 1 : yabai -m space --focus 1
|
||||||
@@ -59,7 +59,7 @@ cmd + shift - 4 : yabai -m window --space 4
|
|||||||
cmd + shift - 5 : yabai -m window --space 5
|
cmd + shift - 5 : yabai -m window --space 5
|
||||||
|
|
||||||
# toggle full screen windows
|
# toggle full screen windows
|
||||||
cmd - f : yabai -m window --toggle zoom-fullscreen
|
cmd - s : yabai -m window --toggle zoom-fullscreen
|
||||||
|
|
||||||
# toogle floating windows
|
# toogle floating windows
|
||||||
cmd - d : yabai -m window --toggle float
|
cmd - d : yabai -m window --toggle float
|
||||||
|
|||||||
@@ -4,16 +4,6 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>AlternateMouseScroll</key>
|
<key>AlternateMouseScroll</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>AppleAntiAliasingThreshold</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>ApplePressAndHoldEnabled</key>
|
|
||||||
<false/>
|
|
||||||
<key>AppleScrollAnimationEnabled</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
<key>AppleSmoothFixedFontsSizeThreshold</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>AppleWindowTabbingMode</key>
|
|
||||||
<string>manual</string>
|
|
||||||
<key>BadgeRightMargin</key>
|
<key>BadgeRightMargin</key>
|
||||||
<integer>10</integer>
|
<integer>10</integer>
|
||||||
<key>BadgeTopMargin</key>
|
<key>BadgeTopMargin</key>
|
||||||
@@ -721,13 +711,13 @@
|
|||||||
<key>Alpha Component</key>
|
<key>Alpha Component</key>
|
||||||
<real>1</real>
|
<real>1</real>
|
||||||
<key>Blue Component</key>
|
<key>Blue Component</key>
|
||||||
<real>0.066666670143604279</real>
|
<real>0.029576778411865234</real>
|
||||||
<key>Color Space</key>
|
<key>Color Space</key>
|
||||||
<string>sRGB</string>
|
<string>sRGB</string>
|
||||||
<key>Green Component</key>
|
<key>Green Component</key>
|
||||||
<real>0.066666670143604279</real>
|
<real>0.029576778411865234</real>
|
||||||
<key>Red Component</key>
|
<key>Red Component</key>
|
||||||
<real>0.066666670143604279</real>
|
<real>0.029576778411865234</real>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Background Image Location</key>
|
<key>Background Image Location</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
@@ -1296,6 +1286,8 @@
|
|||||||
<integer>30</integer>
|
<integer>30</integer>
|
||||||
<key>VisualIndicatorForEsc</key>
|
<key>VisualIndicatorForEsc</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>findMode_iTerm</key>
|
||||||
|
<integer>0</integer>
|
||||||
<key>kCPKSelectionViewPreferredModeKey</key>
|
<key>kCPKSelectionViewPreferredModeKey</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>kCPKSelectionViewShowHSBTextFieldsKey</key>
|
<key>kCPKSelectionViewShowHSBTextFieldsKey</key>
|
||||||
|
|||||||
@@ -58,5 +58,7 @@ yabai -m rule --add app="^Hyperkey$" manage=off
|
|||||||
yabai -m rule --add app="^Finder$" manage=off
|
yabai -m rule --add app="^Finder$" manage=off
|
||||||
yabai -m rule --add app="^IINA$" manage=off
|
yabai -m rule --add app="^IINA$" manage=off
|
||||||
yabai -m rule --add app="^mpv$" manage=off
|
yabai -m rule --add app="^mpv$" manage=off
|
||||||
|
yabai -m rule --add app="^LastPass$" manage=off
|
||||||
|
yabai -m rule --add app="^Calendar$" manage=off
|
||||||
|
|
||||||
echo "yabai configuration loaded.."
|
echo "yabai configuration loaded.."
|
||||||
|
|||||||
88
.vim/vimrc
88
.vim/vimrc
@@ -1,44 +1,33 @@
|
|||||||
" Plugins will be downloaded under the specified directory.
|
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
" Declare the list of plugins
|
" themes
|
||||||
" List ends here. Plugins become visible to Vim after this call.
|
|
||||||
|
|
||||||
" Themes
|
|
||||||
Plug 'arcticicestudio/nord-vim'
|
|
||||||
Plug 'sonph/onehalf', {'rtp': 'vim/'}
|
|
||||||
Plug 'fxn/vim-monochrome'
|
Plug 'fxn/vim-monochrome'
|
||||||
|
Plug 'dylanaraps/wal.vim'
|
||||||
|
|
||||||
" Finder
|
" autocomplete
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
|
|
||||||
" Snippets
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
|
||||||
Plug 'MarcWeber/vim-addon-mw-utils'
|
|
||||||
Plug 'tomtom/tlib_vim'
|
|
||||||
Plug 'https://github.com/honza/vim-snippets'
|
|
||||||
|
|
||||||
" Autocomplete
|
|
||||||
Plug 'ervandew/supertab'
|
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
Plug 'mattn/emmet-vim'
|
|
||||||
|
|
||||||
" Other
|
" other
|
||||||
Plug 'preservim/nerdcommenter'
|
Plug 'preservim/nerdcommenter'
|
||||||
Plug 'scrooloose/nerdtree'
|
Plug 'scrooloose/nerdtree'
|
||||||
Plug '907th/vim-auto-save'
|
Plug '907th/vim-auto-save'
|
||||||
Plug 'airblade/vim-gitgutter'
|
|
||||||
|
" telescope
|
||||||
|
Plug 'nvim-lua/popup.nvim'
|
||||||
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
|
Plug 'fannheyward/telescope-coc.nvim'
|
||||||
|
|
||||||
|
" debugging
|
||||||
|
Plug 'puremourning/vimspector'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Theme settings for tmux
|
" theme settings
|
||||||
set termguicolors
|
set termguicolors
|
||||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||||
|
|
||||||
set background=dark
|
|
||||||
|
|
||||||
if (empty($TMUX))
|
if (empty($TMUX))
|
||||||
if (has("nvim"))
|
if (has("nvim"))
|
||||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||||
@@ -48,43 +37,64 @@ if (empty($TMUX))
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"Set syntax highlighter"
|
set background=dark
|
||||||
colorscheme minochrome
|
colorscheme minochrome
|
||||||
|
|
||||||
" Windows Splits
|
" new leader key
|
||||||
|
nnoremap <SPACE> <Nop>
|
||||||
|
let mapleader=" "
|
||||||
|
|
||||||
|
" windows splits
|
||||||
nnoremap <C-J> <C-W><C-J>
|
nnoremap <C-J> <C-W><C-J>
|
||||||
nnoremap <C-K> <C-W><C-K>
|
nnoremap <C-K> <C-W><C-K>
|
||||||
nnoremap <C-L> <C-W><C-L>
|
nnoremap <C-L> <C-W><C-L>
|
||||||
nnoremap <C-H> <C-W><C-H>
|
nnoremap <C-H> <C-W><C-H>
|
||||||
|
|
||||||
" No Arrow Keys
|
" no arrow keys
|
||||||
noremap <Up> <Nop>
|
noremap <Up> <Nop>
|
||||||
noremap <Down> <Nop>
|
noremap <Down> <Nop>
|
||||||
noremap <Left> <Nop>
|
noremap <Left> <Nop>
|
||||||
noremap <Right> <Nop>
|
noremap <Right> <Nop>
|
||||||
|
|
||||||
" Fuzzy Map Key
|
" telescope essentials
|
||||||
nnoremap <silent> <C-p> :Files<cr>
|
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||||
nnoremap <silent> <C-g> :GFiles<cr>
|
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||||
nnoremap <C-f> :Rg!
|
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||||
nnoremap <C-n> :NERDTreeToggle<CR>
|
nnoremap <leader>ft <cmd>Telescope<cr>
|
||||||
|
|
||||||
" Replace command
|
" telescope git
|
||||||
|
nnoremap <leader>gs <cmd>Telescope git_status<cr>
|
||||||
|
nnoremap <leader>gb <cmd>Telescope git_branches<cr>
|
||||||
|
nnoremap <leader>gc <cmd>Telescope git_commits<cr>
|
||||||
|
|
||||||
|
" telescope coc
|
||||||
|
nmap <silent> gd <cmd>Telescope coc definitions<cr>
|
||||||
|
nmap <silent> gr <cmd>Telescope coc references<cr>
|
||||||
|
|
||||||
|
" debugging keys
|
||||||
|
nmap <Leader>dd <Plug>VimspectorContinue
|
||||||
|
nmap <Leader>ds <Plug>VimspectorStop
|
||||||
|
nmap <Leader>dr <Plug>VimpectorRestart
|
||||||
|
nmap <Leader>dv <Plug>VimspectorToggleBreakpoint
|
||||||
|
|
||||||
|
" replace command
|
||||||
vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
|
vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
|
||||||
|
|
||||||
" Emmet Key Binding
|
" emmet key binding
|
||||||
let g:user_emmet_leader_key=','
|
let g:user_emmet_leader_key=','
|
||||||
|
|
||||||
" Build Commands
|
" build commands
|
||||||
nnoremap <C-b> <Esc>:w<CR>:!clear;python3 %<CR>
|
nnoremap <C-b> <Esc>:w<CR>:!clear;python3 %<CR>
|
||||||
nnoremap <C-t> <Esc>:w<CR>:!clear;pipenv run pytest -v<CR>
|
nnoremap <C-t> <Esc>:w<CR>:!clear;pipenv run pytest -v<CR>
|
||||||
|
|
||||||
" VIM Settings
|
" vim settings
|
||||||
set rtp+=/usr/local/opt/fzf
|
|
||||||
|
|
||||||
set number
|
set number
|
||||||
|
set hidden
|
||||||
|
set nohlsearch
|
||||||
|
set nocompatible
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set tabstop=4 softtabstop=0 expandtab shiftwidth=4
|
set tabstop=4 softtabstop=0 expandtab shiftwidth=4
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
let g:auto_save = 1
|
let g:auto_save = 1
|
||||||
|
|
||||||
|
|||||||
27
.zshrc
27
.zshrc
@@ -71,7 +71,18 @@ ZSH_THEME="robbyrussell"
|
|||||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git)
|
# Append a command directly
|
||||||
|
|
||||||
|
zvm_after_init_commands+=('[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh')
|
||||||
|
|
||||||
|
plugins=(
|
||||||
|
zsh-autosuggestions
|
||||||
|
git
|
||||||
|
sudo
|
||||||
|
dirhistory
|
||||||
|
osx
|
||||||
|
k
|
||||||
|
)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
@@ -101,11 +112,21 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
# alias zshconfig="mate ~/.zshrc"
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
||||||
|
alias v="nvim"
|
||||||
|
|
||||||
export LDFLAGS="-L/usr/local/opt/openssl/lib"
|
export LDFLAGS="-L/usr/local/opt/openssl/lib"
|
||||||
export CPPFLAGS="-I/usr/local/opt/openssl/include"
|
export CPPFLAGS="-I/usr/local/opt/openssl/include"
|
||||||
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
||||||
export PATH="/usr/local/opt/openjdk/bin:$PATH"
|
export PATH="/usr/local/opt/openjdk/bin:$PATH"
|
||||||
|
|
||||||
|
# fuzzy finder
|
||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|
||||||
|
# nvm config
|
||||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
|
||||||
|
# enhancd
|
||||||
|
export ENHANCD_DISABLE_DOT=1
|
||||||
|
export ENHANCD_DISABLE_HOME=1
|
||||||
|
export ENHANCD_HYPHEN_ARG=1
|
||||||
|
source ~/.enhancd/init.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user