Skip to content

Commit

Permalink
Merge pull request #73 from eshepelyuk/fix/ftd
Browse files Browse the repository at this point in the history
fix: improve justfile extension detection
  • Loading branch information
NoahTheDuke authored Feb 6, 2024
2 parents 8c32cbd + b223a54 commit 0ba9ff4
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 0ba9ff4

Please sign in to comment.