Skip to content

Instantly share code, notes, and snippets.

@ara-ta3
Last active April 11, 2024 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ara-ta3/9e38a41dcbb0a0baeba11c7e98f4ed13 to your computer and use it in GitHub Desktop.
Save ara-ta3/9e38a41dcbb0a0baeba11c7e98f4ed13 to your computer and use it in GitHub Desktop.
dein.vim ddc.vim sample settings

dein.vim and ddc.vim sample settings

call ddc#custom#patch_global('sources', ['around'])
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank'],
\ },
\ 'around': {
\ 'mark': 'A',
\ 'minAutoCompleteLength': 1,
\ }
\ })
call ddc#custom#patch_global(#{
\ ui: 'pum',
\ autoCompleteEvents: [
\ 'InsertEnter', 'TextChangedI', 'TextChangedP',
\ ],
\ })
call ddc#enable()
inoremap <Tab> <Cmd>call pum#map#insert_relative(+1)<CR>
inoremap <S-Tab> <Cmd>call pum#map#insert_relative(-1)<CR>
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
call dein#add('vim-denops/denops.vim')
call dein#add('Shougo/ddc.vim')
call dein#add('Shougo/ddc-around')
call dein#add('Shougo/ddc-matcher_head')
call dein#add('Shougo/ddc-sorter_rank')
call dein#add('Shougo/ddc-ui-pum')
call dein#add('Shougo/pum.vim')
FROM ubuntu:22.04
RUN apt update && apt upgrade -y
RUN apt install -y curl git unzip make build-essential
WORKDIR /opt
RUN git clone --depth 1 https://github.com/vim/vim.git -b v9.1.0304
RUN apt install -y libncurses-dev
WORKDIR /opt/vim
RUN ./configure --with-features=huge --prefix=/opt/vim
RUN make
RUN make install
RUN echo 'export PATH="/opt/vim/bin:$PATH"' >> ~/.bashrc
WORKDIR /root
RUN curl -fsSL https://raw.githubusercontent.com/Shougo/dein-installer.vim/master/installer.sh > /opt/install.dein.vim.sh
RUN mkdir config
RUN sh /opt/install.dein.vim.sh --overwrite-config ./config/dein.vim --use-vim-config
RUN curl -fsSL https://deno.land/x/install/install.sh | sh
RUN echo 'export PATH="/root/.deno/bin:$PATH"' >> ~/.bashrc
COPY vimrc /root/.vimrc
COPY dein.plugins.vimrc /root/
COPY ddc.vimrc /root/
DOCKER=docker
build:
$(DOCKER) build -t vim-ddc .
run: build
$(DOCKER) run -ti vim-ddc bash
" Ward off unexpected things that your distro might have made, as
" well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Set Dein base path (required)
let s:dein_base = '~/config/dein.vim'
" Set Dein source path (required)
let s:dein_src = '~/config/dein.vim/repos/github.com/Shougo/dein.vim'
" Set Dein runtime path (required)
execute 'set runtimepath+=' . s:dein_src
" Call Dein initialization (required)
call dein#begin(s:dein_base)
call dein#add(s:dein_src)
" Your plugins go here:
source ./dein.plugins.vimrc
" Finish Dein initialization (required)
call dein#end()
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
filetype indent plugin on
" Enable syntax highlighting
syntax enable
" Uncomment if you want to install not-installed plugins on startup.
if dein#check_install()
call dein#install()
endif
source ./ddc.vimrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment