diff --git a/.vimrc b/.vimrc index 8f012f7..b637f23 100644 --- a/.vimrc +++ b/.vimrc @@ -49,10 +49,10 @@ nnoremap sk k nnoremap sl l " split resize -nnoremap sH < -nnoremap sJ - -nnoremap sK + -nnoremap sL > +nnoremap sH 8< +nnoremap sJ 8- +nnoremap sK 8+ +nnoremap sL 8> " file tree nnoremap sb :Lex @@ -91,34 +91,6 @@ nnoremap ec :vsplit $MYVIMRC " source current file nnoremap so :so % -" coc -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -noremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" triggers completion -inoremap coc#refresh() - -" code action on cursor position -nmap do (coc-codeaction) - -" apply code action to selected region -" xmap a (coc-codeaction-selected) -" nmap a (coc-codeaction-selected) - -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} - -" :Prettier command to prettify file -command! -nargs=0 Prettier :CocCommand prettier.formatFile - " plugins ______________________________ call plug#begin() @@ -130,6 +102,7 @@ Plug 'junegunn/fzf.vim' Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] } Plug 'leafgarland/typescript-vim', { 'for': ['typescript', 'typescript.tsx'] } Plug 'peitalin/vim-jsx-typescript', { 'for': ['typescript.tsx'] } +Plug 'evanleck/vim-svelte' Plug 'neoclide/coc.nvim', {'branch': 'release'} let g:coc_global_extensions = [ @@ -176,6 +149,10 @@ let g:javascript_plugin_flow = 1 " flow syntax highlighting let g:javascript_conceal_function = "ƒ" let g:javascript_conceal_return = "⇚"" +" svelte +let g:svelte_indent_script = 0 +let g:svelte_indent_style = 0 + " SuperCollider au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd set filetype=supercollider au Filetype supercollider packadd scvim @@ -185,7 +162,32 @@ let g:tidal_default_config = {"socket_name": "default", "target_pane": "tidal:1. " plugin keybindings ___________________ +" coc autocompletion +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() + +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +" confirm completion +inoremap pumvisible() ? "\" : "\u\" + +" code action on cursor position +nmap do (coc-codeaction) + +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} + +" :Prettier command to prettify file +command! -nargs=0 Prettier :CocCommand prettier.formatFile + nnoremap :FZF +nnoremap p :FZF nnoremap b :Buffers nnoremap h :History let g:fzf_action = {