-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.min.plug.vimrc
66 lines (56 loc) · 2.16 KB
/
.min.plug.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
if has('nvim')
set runtimepath+=~/.vim
else
source $VIMRUNTIME/defaults.vim
endif
call plug#begin('~/.vim/plugged')
" NOTE: deoplete and neosnippet
let g:python_host_prog = '/usr/local/bin/python2'
let g:python3_host_prog = '/usr/local/bin/python3'
" endif
let python3_path = substitute(system('which python3'),"\n","","")
let g:deoplete#sources#jedi#python_path = python3_path
" NOTE: pylsのlinterの結果がソースコード上に表示されるのは仕様?
" ただし,その結果がredrawしないと消えないのは他の設定の影響?
" apply patch for Apple M1
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash -c \"[[ $(uname -sm) == \\"Darwin arm64\\" ]] && git checkout . && git apply ~/.vim/patch/LanguageClient-neovim.patch; bash install.sh\"',
\ }
" Required: 'autozimu/LanguageClient-neovim'
" python: auopep8 linter -> ale
let g:LanguageClient_serverCommands = {
\ 'vue': ['vls'],
\ 'python': ['pyls'],
\ }
if has('nvim')
" if error occurs, do :UpdateRemotePlugins
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'}
else
" NOTE: don't use lazy load
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'}
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1
" WARN: next commit 381bc21 has bug, be careful!
Plug 'Shougo/neosnippet', {'commit': 'a943f93'}
Plug 'Shougo/neosnippet-snippets' " default snippets
let g:neosnippet#snippets_directory=expand('~/.vim/config/neosnippet/')
" not essential
let g:deoplete#enable_camel_case = 0
let g:deoplete#enable_ignore_case = 0
call plug#end()
call deoplete#custom#var('file', 'enable_buffer_path', v:true)
call deoplete#custom#option({
\ 'auto_complete_start_length': 1,
\ 'enable_smart_case': v:true,
\ 'enable_refresh_always': v:false,
\ 'max_list': 10000,
\ })
inoremap <expr><Tab> pumvisible() ? "\<C-n>" :
\ neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<tab>"
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)