patch 9.0.1807: runtime: crystal scripts not recognised
Commit:
https://github.com/vim/vim/commit/9b73902dbe6f7940326bcd8dbc89d010d85d69c5
Author: Doug Kearns <[email protected]>
Date: Sun Aug 27 19:51:37 2023 +0200
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 <[email protected]>
Co-authored-by: Doug Kearns <[email protected]>
diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim
index 5f3ae4aec..6163003aa 100644
--- a/runtime/autoload/dist/script.vim
+++ b/runtime/autoload/dist/script.vim
@@ -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 ''
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 0bd6453be..aff66d89b 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -944,6 +944,7 @@ def s:GetScriptChecks(): dict<list<list<string>>>
fish: [['#!/path/fish']],
forth: [['#!/path/gforth']],
icon: [['#!/path/icon']],
+ crystal: [['#!/path/crystal']],
}
enddef
diff --git a/src/version.c b/src/version.c
index 0d647ec3f..5b5fdb63d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1807,
/**/
1806,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1qaK3Q-003S8U-3I%40256bit.org.