Code Monkey home page Code Monkey logo

earthly.vim's Introduction

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 [email protected]: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

earthly.vim's People

Contributors

alexcb avatar brandonsc avatar tosainu avatar velutas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

earthly.vim's Issues

tree-sitter

Hey guys,
just a friendly question:
Have you thought about changing this into Tree-sitter parser implementation?
Then it can be used, for example, with Neovim via nvim-treesitter without installing custom plugins. Tree-sitter recently became a de-facto syntax highlighting etc. solution for Neovim.

Unfortunately, I have zero ideas on how to do it and how much work is needed :(

Latest Earthly language keywords not highlighted

Hi team,

Really small nit-pick about the plugin. It looks like the latest new keywords like PROJECT, TRIGGER and PIPELINE haven't been added here for syntax highlighting.

Example using latest plugin version:

Earthly-Before

Was just using this example from the earthly.dev page for it.

Screen Shot 2023-03-18 at 5 09 21 PM

I already made a quick 1-line PR #8 for this, and I ack that an issue probably is overkill but just wanted to document it here in case there was some discussion.

Would be cool (though I'm not really an ANTLR expert) if this could be automated so you didn't have to manually update keywords every time the language definition changed. I guess this is more along the lines of having a more editor agnostic tree-sitter implementation mentioned in #6.

Thanks!

EDIT: I realize this plugin is much much lower priority than VSCode, didn't notice there's already a step of the release process that handles updating VSCode extention which is nice: https://github.com/earthly/earthly/blob/923224f4b5d626c98f4a46d869cc505ce36fc2d9/release/README.md?plain=1#L133

`FUNCTION` not highlighted

Hi there!

I've noticed that FUNCTION is not highlighted since it's a recent addition, would be nice if we can tack it in there.

Thanks!

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.