Skip to content

Commit ee6b283

Browse files
committed
Remove legacy hack forcing justfile to be handled as Makefiles
Both VIM and Neovim ship with native ftdetect rules to detect justfiles and proper syntax highlighting for them. This modline hack is absolete and actually makes these files *less* accessible in modern editors.
1 parent b7e7c46 commit ee6b283

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,11 @@ for Neovim.
517517

518518
#### Makefile Syntax Highlighting
519519

520-
Vim's built-in makefile syntax highlighting isn't perfect for `justfile`s, but
521-
it's better than nothing. You can put the following in `~/.vim/filetype.vim`:
520+
For older versions of VIM/Neovim before Justfile syntax support was added and
521+
when vim-just cannot be installed, it is possible to use the *make* filetype
522+
as a substitute. Vim's built-in makefile syntax highlighting isn't perfect for
523+
`justfile`s, but it's better than nothing. You can put the following in
524+
`~/.vim/filetype.vim`:
522525

523526
```vimscript
524527
if exists("did_load_filetypes")
@@ -537,6 +540,9 @@ per-file basis:
537540
# vim: set ft=make :
538541
```
539542

543+
Note that forcing this workaround in the modeline will make it *harder* for
544+
people to use that have up to date editors with proper Justfile support.
545+
540546
### Emacs
541547

542548
[just-mode](https://github.com/leon-barrett/just-mode.el) provides syntax

justfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,3 @@ test-release-workflow:
233233
# Local Variables:
234234
# mode: makefile
235235
# End:
236-
# vim: set ft=make :

0 commit comments

Comments
 (0)