~/.zshrc
# Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes #ZSH_THEME="robbyrussell" ZSH_THEME="agnoster"
# Uncomment the following line if you want to change the command execution time # stamp shown in the history command output. # You can set one of the optional three formats: # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" # or set a custom format using the strftime function format specifications, # see 'man strftime' for details. # HIST_STAMPS="mm/dd/yyyy" export HISTSIZE=100000 export SAVEHIST=100000 #setopt EXTENDED_HISTORY
# Which plugins would you like to load? # Standard plugins can be found in ~/.oh-my-zsh/plugins/* # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=( git git-auto-fetch zsh-syntax-highlighting zsh-autosuggestions tmux brew colored-man-pages colorize macos nmap svn npm ) source $ZSH/oh-my-zsh.sh # User configuration # export MANPATH="/usr/local/man:$MANPATH" # You may need to manually set your language environment # 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 alias vim="nvim" alias vi="nvim" alias vimdiff="nvim -d" alias colortail='colortail -k ~/.colortail/conf.default ' alias tabv="vsplit_tab" alias tabs="split_tab" export EDITOR=/usr/local/bin/nvim
~/.vim/init.vim
"=============================================================================
" init.vim --- Entry file for neovim
" Copyright (c) 2016-2019 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
call plug#begin("~/.vim/plugged")
"Plug 'glepnir/lspsaga.nvim'
"Plug 'sirver/ultisnips' " snippets -_-
"Plug 'blueyed/vim-diminactive' " 투명화일때 비활성의 색상이 깨짐
Plug 'Yggdroot/indentLine'
Plug 'airblade/vim-gitgutter' " Show git status in vim
Plug 'ap/Vim-css-color' " CSS Color Preview
Plug 'christoomey/vim-tmux-navigator'
Plug 'cohama/lexima.vim'
Plug 'ctrlpvim/ctrlp.vim' " 하위 디렉토리 파일 찾기
Plug 'frazrepo/vim-rainbow' " rainbow pairs
Plug 'iamcco/markdown-preview.nvim'
Plug 'isRuslan/vim-es6'
Plug 'jiangmiao/auto-pairs' " Auto pairs ()
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'leafgarland/typescript-vim'
Plug 'majutsushi/tagbar'
Plug 'mtdl9/vim-log-highlighting' " Log Highlight
Plug 'mxw/vim-jsx'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neovim/nvim-lspconfig'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'octol/vim-cpp-enhanced-highlight' " C++ Syntax
Plug 'osyo-manga/vim-anzu'
Plug 'overcache/NeoSolarized' " Theme
Plug 'pangloss/vim-javascript'
Plug 'preservim/nerdcommenter' " CTRL + _ comments
Plug 'ryanoasis/vim-devicons' " Developer Icons
Plug 'scrooloose/nerdtree' " F2 NerdTree
Plug 'scrooloose/syntastic'
Plug 'sheerun/vim-polyglot'
Plug 'tc50cal/vim-terminal' " \t \T Vim Terminal
Plug 'terryma/vim-multiple-cursors' " CTRL + N for multiple cursors
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-markdown'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround' " Surrounding yes
Plug 'vim-airline/vim-airline' " vim status bar
Plug 'vim-scripts/dbext.vim' " SQL Completion
Plug 'OmniSharp/omnisharp-vim'
Plug 'valloric/MatchTagAlways'
call plug#end()
if exists("&termguicolors") && exists("&winblend")
syntax enable
set termguicolors
set winblend=2
set wildoptions=pum
set pumblend=5
set background=dark
let g:neosolarized_termtrans=1
"runtime ./colors/NeoSolarized.vim
colorscheme NeoSolarized
"let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
"let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
endif
lua require('lspconfig').bashls.setup{}
lua require 'colorizer'.setup()
" execute 'source' fnamemodify(expand('<sfile>'), ':h').'/main.vim'
" coc
let g:loaded_perl_provider = 0
let g:loaded_ruby_provider = 0
let g:loaded_python_provider = 0
let g:coc_global_extensions = [
\ 'coc-clang-format-style-options',
\ 'coc-clangd',
\ 'coc-css',
\ 'coc-eslint',
\ 'coc-html',
\ 'coc-html-css-support',
\ 'coc-htmlhint',
\ 'coc-json',
\ 'coc-markdownlint',
\ 'coc-omnisharp',
\ 'coc-pyright',
\ 'coc-react-refactor',
\ 'coc-sh',
\ 'coc-sql',
\ 'coc-styled-components',
\ 'coc-stylelint',
\ 'coc-tslint-plugin',
\ 'coc-tsserver',
\ 'coc-xml',
\ ]
" let g:coc_global_extensions = [
" \ 'coc-cmake',
" \ 'coc-deno',
" \ 'coc-emmet',
" \ 'coc-go',
" \ 'coc-golines',
" \ 'coc-graphql',
" \ 'coc-phpls',
" \ 'coc-php-cs-fixer',
" \ 'coc-prettier',
" \ 'coc-pairs',
" \ 'coc-yaml',
" \ ]
filetype plugin on
" let g:python_host_prog = '/usr/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
let g:diminactive_enable_focus = 1
set signcolumn=no
hi coc_err_hi ctermfg=1 ctermbg=15
sign define coc_err numhl=coc_err_hi
sign place 1 line=2 name=coc_err
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
"nnoremap <LEADER>H :call <SID>show_documentation()<CR>
set vb
set nu
set nuw=5 " 줄 번호 표시 너비
set backspace=eol,start,indent
set scrolloff=7 " 스크롤 내릴때 아래에 커서가 7줄 위에 있게
" 편집 기능 설정
set sol
set sm
set km=startsel
" 검색 기능 설정
set hlsearch
set ignorecase
set showmatch
" indent 설정
set cindent
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set softtabstop=4
set noet " 탭 -> 공백 변환기능 no
set mouse=nv " 마우스 사용
" Turn off swap
set noswapfile
set nobackup
set nowb
set whichwrap+=<,>,h,l,[,]
" vim-rainbow
let g:rainbow_active = 1
" indent_guides
let g:indent_guides_enable_on_vim_startup = 1
" NERDCommenter
nmap <C-_> <Plug>NERDCommenterToggle
vmap <C-_> <Plug>NERDCommenterToggle<CR>gv
" NERDTree
let NERDTreeQuitOnOpen=1
let g:NERDTreeMinimalUI=1
let NERDTreeWinPos="left"
let NERDTreeShowHidden=1
nmap <F2> :NERDTreeToggle<CR>
"inoremap <silent><expr> <c-space> coc#refresh()
if exists('*complete_info')
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
else
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
endif
" vim-terminal <Leader> => \
map <Leader>t :term ++close<cr> " vim-powered terminal in split window
tmap <Leader>t <c-w>:term ++close<cr>
map <Leader>T :tab term ++close<cr> " vim-powered terminal in new tab
tmap <Leader>T <c-w>:tab term ++close<cr>
" coc
" 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)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <[email protected]> coc#refresh()
endif
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: <leader>aap for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add :Format command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add :Fold command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add :OR command for organize imports of the current buffer.
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see :h coc-status for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
~/.vim/coc-settings.json
{
"coc.preferences.hoverTarget": "float",
"diagnostic.enable": true,
"coc.preferences.bracketEnterImprove": true,
"coc.preferences.colorSupport": true,
"coc.preferences.floatActions": true,
"coc.preferences.snippets.enable": false,
"diagnostic.checkCurrentLine": true,
"diagnostic.errorSign": "✗",
"diagnostic.hintSign": "ℹ︎",
"diagnostic.infoSign": "ℹ︎",
"diagnostic.joinMessageLines": false,
"diagnostic.level": "information",
"diagnostic.locationlist": false,
"diagnostic.messageTarget": "float",
"diagnostic.virtualText": false,
"diagnostic.warningSign": "⚠︎",
"signature.enable": true,
"suggest.autoTrigger": "none",
"suggest.noselect": false,
"coc.preferences.formatOnSaveFiletypes": [
"css",
"markdown",
"html",
"javascript",
"typescript",
"typescriptreact",
"json",
"typescript.tsx",
"graphql"
],
"languageserver": {
"bash": {
"command": "bash-language-server",
"args": ["start"],
"filetypes": ["sh"],
"ignoredRootPaths": ["~"]
},
//"clangd": {
//"command": "clangd",
//"rootPatterns": ["compile_flags.txt", "compile_commands.json"],
//"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"]
//},
"sql": {
"command": "sql-language-server",
"args" : ["up", "--method", "stdio"],
"filetypes": ["sql", "mysql"]
}
},
"clangd.semanticHighlighting": true,
"coc.preferences.currentFunctionSymbolAutoUpdate": true,
"eslint.packageManager": "yarn",
"eslint.nodePath": ".yarn/sdks",
"workspace.workspaceFolderCheckCwd": false,
//"tsserver.tsdk": ".yarn/sdks/typescript/lib",
"json.enable": true,
"json.format.enable": true,
"html-css-support.enabledLanguages": [
"htm",
"html",
"cshtml",
"typescriptreact",
"javascriptreact"
],
"omnisharp.version": "v1.37.3",
"omnisharp.trace.server": "information",
"omnisharp.debug.server": true,
"python.linting.enable": true,
"python.linting.pylintEnabled": true,
"sh.enable": true
}
~/.SpaceVim.d/init.toml
#=============================================================================
# basic.toml --- basic configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]
# set spacevim theme. by default colorscheme layer is not loaded,
# if you want to use more colorscheme, please load the colorscheme
# layer
#colorscheme = "gruvbox"
colorscheme = "onedark"
colorscheme_bg = "dark"
# Disable guicolors in basic mode, many terminal do not support 24bit
# true colors
enable_guicolors = false
# Disable statusline separator, if you want to use other value, please
# install nerd fonts
statusline_separator = "nil"
statusline_inactive_separator = "bar"
buffer_index_type = 4
windows_index_type = 3
enable_tabline_filetype_icon = false
enable_statusline_mode = false
statusline_unicode_symbols = false
# Enable vim compatible mode, avoid changing origin vim key bindings
vimcompatible = true
# Enable autocomplete layer
[[layers]]
name = 'autocomplete'
auto-completion-return-key-behavior = "complete"
auto-completion-tab-key-behavior = "cycle"
[[layers]]
name = 'shell'
default_position = 'top'
default_height = 30
