1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ddc.vim 導入と asyncomplete.vim 導入(neocomplete.vim からの移行)

Last updated at Posted at 2022-09-25

概要

neocomplete.vim がいつのまにか使えなくなっていたので、ddc.vim という次世代補完プラグインを導入してみた。
設定がこれで正しいのか、正直わからない。
多分動いていると思う。
で、正直よく分からないので、もう一つの次世代補完プラグインである asyncomplete.vim の導入もしてみて、どちらが楽かを比較してみた。

dein.toml(ddc.vim)
#-- 補完
# 本体
[[plugins]]
repo = 'Shougo/ddc.vim'
on_event = 'InsertEnter'
depends = ['denops.vim']
hook_source = '''
call ddc#custom#patch_global('completionMenu', 'pum.vim')
call ddc#custom#patch_global('sources', ['vim-lsp', 'around', 'file'])
call ddc#custom#patch_global('sourceOptions', {
\    '_': {
\        'matchers': ['matcher_head'],
\        'sorters': ['sorter_rank'],
\        'converters': ['converter_remove_overlap'],
\    },
\    'around': {'mark': 'AROUND'},
\    'vim-lsp': {
\        'mark': 'LSP',
\        'matchers': ['matcher_head'],
\        'forceCompletionPattern': '\.\w*|:\w*|->\w*',
\    },
\    'file': {
\        'mark': 'FILE',
\        'isVolatile': v:true, 
\        'forceCompletionPattern': '\S/\S*'
\    },
\})
call ddc#custom#patch_global('sourceParams', {
\    'around': {'maxSize': 500},
\})
inoremap <Tab> <Cmd>call pum#map#insert_relative(+1)<CR>
inoremap <S-Tab> <Cmd>call pum#map#insert_relative(-1)<CR>
call ddc#enable()
'''
# Deno で Vim プラグインを開発するためのプラグイン
[[plugins]]
repo = 'vim-denops/denops.vim'
# ポップアップウィンドウを表示するプラグイン
[[plugins]]
repo = 'Shougo/pum.vim'
# カーソル周辺の既出単語を補完する Source
[[plugins]]
repo = 'Shougo/ddc-around'
on_source = 'ddc.vim'
# ファイル名を補完する source
[[plugins]]
repo = 'LumaKernel/ddc-file'
on_source = 'ddc.vim'
# 入力中の単語を補完の対象にする Filter
[[plugins]]
repo = 'Shougo/ddc-matcher_head'
on_source = 'ddc.vim'
# 補完候補を適切にソートする Filter
[[plugins]]
repo = 'Shougo/ddc-sorter_rank'
on_source = 'ddc.vim'
# 補完候補の重複を防ぐための Filter
[[plugins]]
repo = 'Shougo/ddc-converter_remove_overlap'
on_source = 'ddc.vim'
# LSP
[[plugins]]
repo = 'mattn/vim-lsp-settings'
[[plugins]]
repo = 'prabirshrestha/vim-lsp'
#-------------------------------------------------------------------------------
dein.toml(asyncomplete.vim)
[[plugins]]
repo = 'prabirshrestha/vim-lsp'
[[plugins]]
repo = 'mattn/vim-lsp-settings'
[[plugins]]
repo = 'prabirshrestha/asyncomplete.vim'
[[plugins]]
repo = 'prabirshrestha/asyncomplete-lsp.vim'
[[plugins]]
repo = 'prabirshrestha/async.vim'
[[plugins]]
repo = 'prabirshrestha/asyncomplete-neosnippet.vim'
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?