rakiyoshi / dotfiles

0 stars 0 forks source link

補完効かせる #3

Open rakiyoshi opened 4 years ago

rakiyoshi commented 4 years ago

VSCodeに魂を売らない

rakiyoshi commented 4 years ago

これはうごく

[ec2-user@ip-172-31-38-26 nvim]$ cat *
[[plugins]]
repo='prabirshrestha/async.vim'

[[plugins]]
repo='prabirshrestha/vim-lsp'
hook_add='''
if executable('clangd')
    au User lsp_setup call lsp#register_server({
        \ 'name': 'clangd',
        \ 'cmd': {server_info->['clangd']},
        \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'],
        \ })
endif

let g:lsp_signs_enabled = 1         " enable signs
let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode

let g:lsp_signs_error = {'text': '✗'}
let g:lsp_signs_warning = {'text': '‼'}
'''

[[plugins]]
repo='prabirshrestha/asyncomplete.vim'

[[plugins]]
repo='prabirshrestha/asyncomplete-lsp.vim'

[[plugins]]
repo='prabirshrestha/asyncomplete-neosnippet.vim'
hook_add='''
call asyncomplete#register_source(asyncomplete#sources#neosnippet#get_source_options({
    \ 'name': 'neosnippet',
    \ 'whitelist': ['*'],
    \ 'completor': function('asyncomplete#sources#neosnippet#completor'),
    \ }))
imap <C-k>     <Plug>(neosnippet_expand_or_jump)
smap <C-k>     <Plug>(neosnippet_expand_or_jump)
xmap <C-k>     <Plug>(neosnippet_expand_target)
'''

[[plugins]]
repo='mattn/vim-lsp-settings'

"----------------------------------------------------------------------
" Dein設定
"----------------------------------------------------------------------

" Dein
let s:dein_dir = expand('~/.cache/dein')
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'

" dein.vimが存在していない場合はgithubからclone
if &runtimepath !~# '/dein.vim'
  if !isdirectory(s:dein_repo_dir)
    execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir
  endif
  execute 'set runtimepath^=' . fnamemodify(s:dein_repo_dir, ':p')
endif

if dein#load_state(s:dein_dir)
  call dein#begin(s:dein_dir)
  let s:toml_dir = expand('~/.config/nvim')
  call dein#load_toml(s:toml_dir . '/dein.toml', {'lazy': 0})
  call dein#load_toml(s:toml_dir . '/dein_lazy.toml', {'lazy': 1})
  call dein#end()
  call dein#save_state()
endif

filetype plugin indent on
syntax enable

" If you want to install not installed plugins on startup.
if dein#check_install()
  call dein#install()
endif

" 自動削除
let g:dein#auto_recache = 1