Giter Club home page Giter Club logo

denops-dockerfile's Introduction

denops-dockerfile

Build

Usage

Minimum

Create a new docker image from ghcr.io/vim-denops/vim or ghcr.io/vim-denops/neovim and clone Vim plugins in working directory like

FROM ghcr.io/vim-denops/vim

RUN apt-get update \
 && apt-get install -y --no-install-recommends \
      curl \
      ca-certificates \
      ripgrep

ARG VERSION=main
RUN curl -sSL https://github.com/vim-denops/denops-helloworld.vim/archive/${VERSION}.tar.gz \
  | tar xz \
 && deno cache --unstable */denops/**/*.ts

Then build and run the image like

docker build -f Dockerfile -t vim .
docker run --rm -it vim

See examples/denops-helloworld.vim for details.

Advanced

If you need to define .vimrc, copy it to /root/.vimrc (Vim) or /root/.config/nvim/init.vim (Neovim).

For example, Shougo/ddc.vim requires .vimrc like

" Load all plugins
packloadall

" Customize global settings
" Use around source.
" https://github.com/Shougo/ddc-around
call ddc#custom#patch_global('sources', ['around'])

" Use matcher_head and sorter_rank.
" https://github.com/Shougo/ddc-matcher_head
" https://github.com/Shougo/ddc-sorter_rank
call ddc#custom#patch_global('sourceOptions', {
      \ '_': {
      \   'matchers': ['matcher_head'],
      \   'sorters': ['sorter_rank']},
      \ })

" Use ddc.
call ddc#enable()

Copy above .vimrc with COPY command like

FROM ghcr.io/vim-denops/vim

RUN apt-get update \
 && apt-get install -y --no-install-recommends \
      ca-certificates \
      git

RUN git clone https://github.com/Shougo/ddc.vim \
 && git clone https://github.com/Shougo/ddc-around \
 && git clone https://github.com/Shougo/ddc-matcher_head \
 && git clone https://github.com/Shougo/ddc-sorter_rank \
 && deno cache --unstable */denops/**/*.ts

COPY vimrc /root/.vimrc

Then build and run the image like

docker build -f Dockerfile -t vim .
docker run --rm -it vim

See examples/ddc.vim for details.

Development

Build ghcr.io/vim-denops/vim and ghcr.io/vim-denops/neovim with

make build

The push it with

make push

License

The code follows MIT license written in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.

denops-dockerfile's People

Contributors

lambdalisue avatar kuuote avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.