vim-patch:9.1.1468: filetype: bright(er)script files are not recognized

Problem:  filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
          brightscript filetype, include filetype plugins (Riley Bruins)

closes: vim/vim#17566

https://github.com/vim/vim/commit/03e5ee25fdd4f8ee16b00688e24c4ad3b8f8f935

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:
Christian ClasonandRiley Bruins authored and Christian Clason committed 2025-06-19 11:10:38 +02:00
1 parent 2379fb053a
commit 487112d674
4 files changed
+28

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
" Vim filetype plugin
" Language: Brighterscript
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jun 17
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
runtime! ftplugin/brightscript.vim
+13
View File
@@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: Brightscript
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jun 17
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setl comments=:' commentstring='\ %s
let b:undo_ftplugin = 'setl com< cms<'
+2
View File
@@ -258,6 +258,8 @@ local extension = {
bl = 'blank',
blp = 'blueprint',
bp = 'bp',
bs = 'brighterscript',
brs = 'brightscript',
bsd = 'bsdl',
bsdl = 'bsdl',
bst = 'bst',
+2
View File
@@ -142,6 +142,8 @@ func s:GetFilenameChecks() abort
\ 'blank': ['file.bl'],
\ 'blueprint': ['file.blp'],
\ 'bp': ['Android.bp'],
\ 'brighterscript': ['file.bs'],
\ 'brightscript': ['file.brs'],
\ 'bsdl': ['file.bsd', 'file.bsdl'],
\ 'bst': ['file.bst'],
\ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE', 'WORKSPACE.bzlmod'],