Skip to content

Commit

Permalink
fix: detect justfile extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Ievgenii Shepeliuk <[email protected]>
  • Loading branch information
eshepelyuk committed Feb 6, 2024
1 parent 8c32cbd commit 4ee0f51
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ftdetect/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
" Maintainer: Noah Bogart <[email protected]>
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2023 Dec 03
au BufNewFile,BufRead \c{,.}justfile,\c*.just setfiletype just
au BufNewFile,BufRead \c{,.}justfile,\c*.just,\c*.justfile setfiletype just
au BufNewFile,BufRead * if getline(1) =~# '\v^#!//@!%(\w|-|//@!)*/%(env%(\s+-S)?\s+)?just\A' | setfiletype just | endif
20 changes: 19 additions & 1 deletion tests/cases/ftdetect.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@
{
"filename": "*.JUST"
},
{
"filename": "test.justfile"
},
{
"filename": "test.Justfile"
},
{
"filename": "test.JUSTFILE"
},
{
"filename": "test.just"
},
{
"filename": "test.Just"
},
{
"filename": "test.JUST"
},
{
"content": "#!/usr/bin/env -S just -f\n"
},
Expand Down Expand Up @@ -55,4 +73,4 @@
"content": "#!//usr/local/bin/just -f\n",
"not_justfile": true
}
]
]

0 comments on commit 4ee0f51

Please sign in to comment.