shun / ddc-source-vim-lsp

vim-lsp source for ddc.vim
MIT License
44 stars 13 forks source link

minimal .vimrc #14

Closed shun closed 2 years ago

shun commented 2 years ago
set encoding=utf-8
scriptencoding utf-8
set nocp

let g:loaded_getscript = 1
let g:loaded_getscriptPlugin = 1
let g:loaded_logiPat = 1
let g:loaded_spellfile_plugin = 1
let g:loaded_rrhelper = 1
let g:loaded_vimball = 1
let g:loaded_vimballPlugin = 1

let s:dein_repo_dir = expand('~/.cache/dein/repos/github.com/Shougo/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^=' . s:dein_repo_dir

if dein#load_state('~/.cache/dein/')
    call dein#begin('~/.cache/dein/')
    call dein#add('vim-denops/denops.vim')
    call dein#add('Shougo/ddc.vim')
    call dein#add('Shougo/ddc-matcher_head')
    call dein#add('Shougo/ddc-sorter_rank')
    call dein#add('shun/ddc-vim-lsp')
    call dein#add('prabirshrestha/vim-lsp')
    call dein#add('mattn/vim-lsp-settings')
    call dein#end()
    call dein#save_state()
endif

if dein#check_install()
    call dein#install()
endif
filetype plugin indent on
syntax enable

call ddc#custom#patch_global('sources', ['vim-lsp'])
call ddc#custom#patch_global('sourceOptions', {
  \ '_': {
  \   'ignoreCase': v:true,
  \   'matchers': ['matcher_head'],
  \   'sorters': ['sorter_rank'],
  \ },
  \ 'vim-lsp': {
  \     'mark': 'LSP',
  \     'forceCompletionPattern': '\.\w*|:\w*|->\w*',
  \     'minAutoCompleteLength': 1,
  \ },
  \ })
call ddc#enable()