Last active
September 24, 2019 12:39
-
-
Save delphinus/2e17a0ac91deb65055e40decfe9d844f to your computer and use it in GitHub Desktop.
deoplete-lsp testing with python only
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
| FROM ubuntu:latest | |
| RUN apt-get update && apt-get install -y \ | |
| ninja-build gettext libtool libtool-bin autoconf automake cmake g++ \ | |
| pkg-config unzip \ | |
| git python3 python3-dev python3-pip \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN git clone --depth 1 --single-branch --branch lsp https://github.com/h-michael/neovim ~/neovim \ | |
| && cd ~/neovim \ | |
| && make CMAKE_BUILD_TYPE=Release \ | |
| && make install | |
| RUN mkdir -p ~/test \ | |
| && git clone https://github.com/Shougo/deoplete.nvim ~/test/deoplete.nvim \ | |
| && git clone https://github.com/dense-analysis/ale ~/test/ale | |
| RUN pip3 install pynvim | |
| RUN pip3 install python-language-server | |
| RUN mkdir -p ~/.config/nvim | |
| RUN echo '\ | |
| if $USE_ALE == ""\n\ | |
| call lsp#add_server_config({"filetype": "python", "cmd": {"execute_path": "pyls", "args": []}})\n\ | |
| call luaeval("require(\"vim.lsp.config\").set_builtin_callback(\"textDocument/completion\")")\n\ | |
| augroup MyLanguageServer\n\ | |
| au!\n\ | |
| autocmd Filetype python inoremap <buffer> <c-l> <c-r>=lsp#text_document_completion()<CR>\n\ | |
| augroup END\n\ | |
| else\n\ | |
| set runtimepath+=~/test/deoplete.nvim\n\ | |
| set runtimepath+=~/test/ale\n\ | |
| let g:ale_linters = {"python": ["pyls"]}\n\ | |
| call deoplete#enable()\n\ | |
| endif\n\ | |
| ' >> ~/.config/nvim/init.vim | |
| RUN echo '#!/usr/bin/env python\n\ | |
| import json\n\ | |
| \n\ | |
| def main():\n\ | |
| json\n\ | |
| "foo"\n\ | |
| ' >> ~/hoge.py | |
| RUN echo 'python3 -V' >> ~/.bashrc | |
| RUN echo '( cd ~/test/deoplete.nvim && echo "deoplete.nvim: $(git rev-parse --short HEAD)" )' >> ~/.bashrc | |
| RUN echo '( cd ~/test/ale && echo "ale: $(git rev-parse --short HEAD)" )' >> ~/.bashrc | |
| RUN echo '( cd ~/neovim && echo "neovim: $(git rev-parse --short HEAD)" )' >> ~/.bashrc | |
| RUN echo 'nvim --version' >> ~/.bashrc | |
| RUN USE_ALE=1 nvim +UpdateRemotePlugins +q | |
| WORKDIR /root | |
| ENTRYPOINT /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment