Last active
April 2, 2020 05:27
-
-
Save tsuyoshicho/e8bc392f0c602432b9b43fa6380198d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " install vim-pulg | |
| if has('vim_starting') | |
| set rtp+=~/.vim/plugged/vim-plug | |
| if !isdirectory(expand('~/.vim/plugged/vim-plug')) | |
| echo 'install vim-plug...' | |
| call mkdir(expand('~/.vim/plugged/vim-plug'), 'p') | |
| call system('git clone https://github.com/junegunn/vim-plug.git ' . expand('~/.vim/plugged/vim-plug/autoload')) | |
| end | |
| endif | |
| " setup | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'prabirshrestha/async.vim' | |
| Plug 'prabirshrestha/vim-lsp' | |
| Plug 'prabirshrestha/asyncomplete.vim' | |
| Plug 'prabirshrestha/asyncomplete-lsp.vim' | |
| Plug 'mattn/vim-lsp-settings' | |
| call plug#end() | |
| " plugin setting - lsp | |
| augroup LspMappings | |
| au! | |
| au FileType vim,python call s:lsp_common_mappings() | |
| augroup END | |
| function! s:lsp_common_mappings() abort | |
| setlocal omnifunc=lsp#complete | |
| nmap <buffer> K <Plug>(lsp-hover) | |
| nmap <buffer> <silent> [g <Plug>(lsp-previous-diagnostic) | |
| nmap <buffer> <silent> ]g <Plug>(lsp-next-diagnostic) | |
| nmap <buffer> gd <Plug>(lsp-definition) | |
| endfunction | |
| inoremap <expr> <C-y> pumvisible() ? asyncomplete#close_popup() : "\<C-y>" | |
| inoremap <expr> <C-e> pumvisible() ? asyncomplete#cancel_popup() : "\<C-e>" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Invoke
gvim -N -u testvimrc.vim