neovim으로 다시 돌아감

This commit is contained in:
2021-07-24 02:40:01 +09:00
parent ed5e9623f3
commit f11ad31663
8 changed files with 176 additions and 99 deletions

75
vimrc
View File

@@ -8,6 +8,9 @@ Plug 'prettier/vim-prettier', {
" 아이콘 폰트 사용
Plug 'ryanoasis/vim-devicons'
" Start page
Plug 'mhinz/vim-startify'
" NERDTree
" NERDTree git
Plug 'preservim/nerdtree'
@@ -26,15 +29,15 @@ Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" 컬러 테마
Plug 'chriskempson/base16-vim'
Plug 'dracula/vim', { 'as': 'dracula' }
" automatic closing of quotes, parenthesis, brackets, etc.
Plug 'Raimondi/delimitMate'
" Language Pack
Plug 'sheerun/vim-polyglot'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
" indent 표시
Plug 'Yggdroot/indentLine'
@@ -58,7 +61,11 @@ set ruler
set title
set hlsearch
set cursorline
syntax on
syntax enable
set t_Co=256
if (has("termguicolors"))
set termguicolors
endif
set clipboard=unnamed
" set clipboard+=unnamedplus
@@ -68,32 +75,38 @@ set shell=/bin/bash
set fillchars+=vert:┃
set mouse=a
if has("mouse_sgr")
set ttymouse=sgr
else
set ttymouse=xterm2
end
set encoding=UTF-8
" theme config
let g:dracula_italic = 0
colorscheme dracula
hi Normal guibg=NONE ctermbg=NONE
" 단축키 설정
nmap <C-p> :FZF<cr>
nmap <Leader>p :FZF<cr>
nmap <Tab> :NERDTreeToggle<cr>
nmap <Leader>f <Plug>(coc-fix-current)
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
" extension
autocmd BufNewFile,BufRead *.tsx,*.jsx set filetype=typescriptreact
" theme config
colorscheme base16-tomorrow
hi Normal guibg=NONE ctermbg=NONE
hi EndOfBuffer guibg=NONE ctermbg=NONE
" detect extension
autocmd BufNewFile,BufRead *.tsx set filetype=typescriptreact
autocmd BufNewFile,BufRead *.jsx set filetype=javascriptreact
autocmd BufNewFile,BufRead .eslintrc set filetype=json
" devicons
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
let g:DevIconsEnableFoldersOpenClose = 1
" airline
let g:airline_theme = 'base16'
let g:airline_theme='dracula'
let g:airline_powerline_fonts=0
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#tab_nr_type = 1 " tab number
@@ -115,4 +128,38 @@ let g:prettier#autoformat = 1
let g:prettier#autoformat_require_pragma = 0
" nerdtree
let NERDTreeShowHidden=1
let g:NERDTreeWinPos = 'right'
let g:NERDTreeShowHidden=1
let g:NERDTreeAutoDeleteBuffer=1
let NERDTreeMinimalUI=1
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
" Open the existing NERDTree on each new tab.
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
let g:indentLine_char='│'
let g:indentLine_color_gui='gray'
"""
" Coc
"""
" Use K to show documentation in preview window.
nmap <leader>f <Plug>(coc-codeaction)
" 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 K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
autocmd CursorHold * silent call CocActionAsync('highlight')
function! s:show_documentation()
call CocActionAsync('doHover')
endfunction