kpine / earthly.vim

Earthfile syntax highlighting for vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Earthfile syntax highlighing

Syntax highlighting for Earthly Earthfiles for Vim.

For an introduction of Earthly see the Earthly GitHub repository or the Earthly documentation.

Requirements

  • Install vim or neovim

  • Enable syntax highlighting:

    Update your ~/.vimrc file to include:

    syntax on

Installation Notes

Use your favorite plugin manager:

Vim-Plug

Using the vim-plug plugin manager, add:

Plug 'earthly/earthly.vim', { 'branch': 'main' }

Then run

:PlugInstall

Pathogen

git clone git@github.com:earthly/earthly.vim.git ~/.vim/bundle/earthly

Manual

To install manually, copy syntax/Earthfile.vim to ~/.vim/syntax/Earthfile.vim.

Now write the following into the file at ~/.vim/ftdetect/Earthfile.vim

au BufRead,BufNewFile Earthfile set filetype=Earthfile
au BufRead,BufNewFile build.earth set filetype=Earthfile

Neovim

Neovim users will have to change the ~/.vim/ prefix in the above steps to ~/.config/nvim.

Screenshot

Java example Earthfile in Vim

About

Earthfile syntax highlighting for vim

License:Mozilla Public License 2.0


Languages

Language:Vim Script 100.0%