1
0
forked from aniani/vim

patch 9.0.1807: runtime: crystal scripts not recognised

Problem:  runtime: crystal scripts not recognised
Solution: Filetype detect Crystal scripts by shebang line

closes: #12935

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
Doug Kearns 2023-08-27 19:51:37 +02:00 committed by Christian Brabandt
parent 73aba18eb7
commit 9b73902dbe
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
3 changed files with 7 additions and 0 deletions

View File

@ -209,6 +209,10 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ 'nix-shell'
return 'nix'
# Crystal
elseif name =~ '^crystal\>'
return 'crystal'
endif
return ''

View File

@ -944,6 +944,7 @@ def s:GetScriptChecks(): dict<list<list<string>>>
fish: [['#!/path/fish']],
forth: [['#!/path/gforth']],
icon: [['#!/path/icon']],
crystal: [['#!/path/crystal']],
}
enddef

View File

@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1807,
/**/
1806,
/**/