Syntax highlighting for Earthly Earthfiles for Vim.
For an introduction of Earthly see the Earthly GitHub repository or the Earthly documentation.
Use your favorite plugin manager:
Using the vim-plug plugin manager, add:
Plug 'earthly/earthly.vim', { 'branch': 'main' }
Then run
:PlugInstall
git clone git@github.com:earthly/earthly.vim.git ~/.vim/bundle/earthly
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 users will have to change the ~/.vim/
prefix in the above steps to ~/.config/nvim
.