Vim and Neovim
vim-just
The vim-just plugin provides syntax
highlighting for justfile
s.
Install it with your favorite package manager, like Plug:
call plug#begin()
Plug 'NoahTheDuke/vim-just'
call plug#end()
Or with Vim’s built-in package support:
mkdir -p ~/.vim/pack/vendor/start
cd ~/.vim/pack/vendor/start
git clone https://github.com/NoahTheDuke/vim-just.git
tree-sitter-just
tree-sitter-just is an Nvim Treesitter plugin for Neovim.
Makefile Syntax Highlighting
Vim’s built-in makefile syntax highlighting isn’t perfect for justfile
s, but
it’s better than nothing. You can put the following in ~/.vim/filetype.vim
:
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
au BufNewFile,BufRead justfile setf make
augroup END
Or add the following to an individual justfile
to enable make
mode on a
per-file basis:
# vim: set ft=make :