Last active
October 19, 2021 05:39
-
-
Save delphinus/41fb7d284aeb0e5485f3bca0cda7fd8b to your computer and use it in GitHub Desktop.
ddc-nvim-lsp testing
This file contains 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:21.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 | |
# 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/ddc-matcher_head \ | |
~/.local/share/nvim/site/pack/packer/start/ddc-matcher_head | |
RUN git clone https://github.com/Shougo/ddc-nvim-lsp \ | |
~/.local/share/nvim/site/pack/packer/start/ddc-nvim-lsp | |
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/neovim/nvim-lspconfig \ | |
~/.local/share/nvim/site/pack/packer/start/nvim-lspconfig | |
RUN go get golang.org/x/tools/gopls@master golang.org/x/tools@master | |
RUN mkdir -p ~/.config/nvim | |
COPY <<-"FILE" /root/.config/nvim/init.vim | |
call ddc#custom#patch_global({ | |
\ 'sources': ['nvim-lsp', 'around'], | |
\ 'sourceOptions': { | |
\ '_': {'matchers': ['matcher_head']}, | |
\ 'around': {'mark': 'A'}, | |
\ 'nvim-lsp': {'mark': 'L', 'forceCompletionPattern': '\.\w*|:\w*|->\w*'}, | |
\ }, | |
\ }) | |
call ddc#enable() | |
lua << EOF | |
require'lspconfig'.gopls.setup{} | |
EOF | |
FILE | |
WORKDIR /root | |
ENTRYPOINT /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment