Skip to content

Instantly share code, notes, and snippets.

@delphinus
Created February 6, 2021 07:34
Show Gist options
  • Save delphinus/59965f1427ef5966c82526fb1064853c to your computer and use it in GitHub Desktop.
Save delphinus/59965f1427ef5966c82526fb1064853c to your computer and use it in GitHub Desktop.
denite.nvim testing
FROM ubuntu:21.04
RUN yes | unminimize
ENV DEBIAN_FRONTEND=noninteractive
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
RUN git clone --single-branch \
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 echo 'nvim --version' >> ~/.bashrc
RUN git clone https://github.com/Shougo/denite.nvim \
~/.local/share/nvim/site/pack/denite/start/denite.nvim
RUN apt-get install -y python3-pip
RUN pip3 install pynvim
RUN mkdir -p ~/.config/nvim
RUN echo '\
vim.api.nvim_exec([[\n\
autocmd FileType denite lua _G.denite_my_settings()\n\
autocmd FileType denite-filter lua _G.denite_filter_my_settings()\n\
]], false)\n\
\n\
function _G.denite_my_settings()\n\
vim.api.nvim_exec([[\n\
nnoremap <silent><buffer><expr> <C-c> denite#do_map("quit")\n\
nnoremap <silent><buffer><expr> <CR> denite#do_map("do_action")\n\
nnoremap <silent><buffer><expr> i denite#do_map("open_filter_buffer")\n\
]], false)\n\
end\n\
\n\
function _G.denite_filter_my_settings()\n\
vim.api.nvim_exec([[\n\
imap <silent><buffer> <C-c> <Plug>(denite_filter_quit)\n\
]], false)\n\
end\n\
' >> ~/.config/nvim/init.lua
RUN /root/local/nvim/bin/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