Created
December 29, 2021 02:34
-
-
Save delphinus/2fabb20def319b86da1347952b52503c to your computer and use it in GitHub Desktop.
skkeleton testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax = docker/dockerfile:1.3-labs | |
FROM ubuntu:22.04 | |
RUN yes | unminimize | |
RUN apt-get update && apt-get install -y tzdata | |
# https://sleepless-se.net/2018/07/31/docker-build-tzdata-ubuntu/ | |
ENV TZ=Asia/Tokyo | |
RUN apt-get install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ \ | |
pkg-config unzip git man-db libsqlite3-dev \ | |
wamerican \ | |
golang-go \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN git clone --depth 1 --single-branch -b master \ | |
https://github.com/neovim/neovim ~/neovim \ | |
&& cd ~/neovim \ | |
&& make CMAKE_BUILD_TYPE=Release \ | |
&& make CMAKE_INSTALL_PREFIX=$HOME/local/nvim install | |
RUN echo 'export PATH=$HOME/local/nvim/bin:$PATH' >> ~/.bashrc | |
RUN curl -fsSL https://deno.land/x/install/install.sh | sh | |
RUN echo 'export PATH=$HOME/.deno/bin:$HOME/go/bin:$PATH' >> ~/.bashrc | |
RUN echo 'nvim --version' >> ~/.bashrc | |
RUN echo '(cd ~/neovim; echo "Neovim revision: $(git rev-parse HEAD)")' >> ~/.bashrc | |
RUN echo 'deno --version' >> ~/.bashrc | |
ADD https://github.com/skk-dev/dict/raw/master/SKK-JISYO.L /usr/share/skk/ | |
# Disable caching below this line | |
# https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands | |
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache | |
RUN git clone https://github.com/Shougo/ddc.vim \ | |
~/.local/share/nvim/site/pack/packer/start/ddc.vim | |
RUN git clone https://github.com/Shougo/ddc-around \ | |
~/.local/share/nvim/site/pack/packer/start/ddc-around | |
RUN git clone https://github.com/Shougo/pum.vim \ | |
~/.local/share/nvim/site/pack/packer/start/pum.vim | |
RUN git clone https://github.com/Shougo/ddc-matcher_head \ | |
~/.local/share/nvim/site/pack/packer/start/ddc-matcher_head | |
RUN git clone https://github.com/vim-denops/denops.vim \ | |
~/.local/share/nvim/site/pack/packer/start/denops.vim | |
RUN git clone https://github.com/vim-skk/skkeleton \ | |
~/.local/share/nvim/site/pack/packer/start/skkeleton | |
RUN mkdir -p ~/.config/nvim | |
COPY <<-"FILE" /root/.config/nvim/init.vim | |
let s:prev_buffer_config = {} | |
function s:skkeleton_enable_pre() | |
let s:prev_buffer_config = ddc#custom#get_buffer() | |
call ddc#custom#patch_buffer({ | |
\ 'completionMenu': 'native', | |
\ 'sources': ['skkeleton'], | |
\ }) | |
endfunction | |
function s:skkeleton_disable_pre() | |
call ddc#custom#set_buffer(s:prev_buffer_config) | |
endfunction | |
augroup my_skkeleton | |
autocmd! | |
autocmd User skkeleton-enable-pre call <SID>skkeleton_enable_pre() | |
autocmd User skkeleton-disable-pre call <SID>skkeleton_disable_pre() | |
augroup END | |
imap <C-j> <Plug>(skkeleton-enable) | |
call ddc#custom#patch_global({ | |
\ 'completionMenu': 'pum.vim', | |
\ 'sources': ['around'], | |
\ 'sourceOptions': { | |
\ '_': {'matchers': ['matcher_head']}, | |
\ 'around': {'mark': 'A'}, | |
\ 'skkeleton': { | |
\ 'mark': 'SKK', | |
\ 'matchers': ['skkeleton'], | |
\ 'sorters': [], | |
\ 'minAutoCompleteLength': 2, | |
\ }, | |
\ }, | |
\ }) | |
call ddc#enable() | |
FILE | |
WORKDIR /root | |
ENTRYPOINT /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment