/earthly.vim

Earthfile syntax highlighting for vim

Primary LanguageVim Script

Earthfile syntax highlighing

Syntax highlighting for Earthly Earthfiles for Vim.

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

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